Files can be written from command line interface

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1054 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-04 21:01:40 +00:00
parent ef598f2d8c
commit 6a71b20d26
8 changed files with 78 additions and 18 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ DECLARE_TYPEOF_COLLECTION(SymbolFont::DrawableSymbol);
// ----------------------------------------------------------------------------- : Utility
// Make sure we can export files to a data directory
void guard_export_info(const String& fun) {
if (!export_info()) {
void guard_export_info(const String& fun, bool need_template = false) {
if (!export_info() && (!need_template || export_info()->export_template)) {
throw ScriptError(_("Can only use ") + fun + _(" from export templates"));
} else if (export_info()->directory_relative.empty()) {
throw ScriptError(_("Can only use ") + fun + _(" when 'create directory' is set to true"));