From 59d59e97fd7013751a57c2de67196d39b37b64ed Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Tue, 21 Apr 2020 00:13:23 +0200 Subject: [PATCH] fixed: write_image_file failed with --export with relative path, because the is-relative-to-target-dir check was wrong --- src/script/functions/export.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/script/functions/export.cpp b/src/script/functions/export.cpp index ddf83dab..0acb0482 100644 --- a/src/script/functions/export.cpp +++ b/src/script/functions/export.cpp @@ -44,7 +44,6 @@ String get_export_full_path(String& rel_name) { if (!ei.allow_writes_outside) { // check if path is okay wxFileName fn2(_("x")); - fn2.SetPath(ei.directory_absolute); fn2.Normalize(wxPATH_NORM_ALL, ei.directory_absolute); String p1 = fn.GetFullPath(); String p2 = fn2.GetFullPath(); @@ -53,7 +52,7 @@ String get_export_full_path(String& rel_name) { throw ScriptError(_("Not a relative filename: ") + rel_name); } } - rel_name = fn.GetFullName(); + rel_name = fn.GetFullName(); // TODO: does this work correctly with subdirectories in target dir? return fn.GetFullPath(); }