mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user