13
0

Allow export get_path() without format

This is in preparation for post-export screenshots:
A possibility to get a file-path, independent of the format.
This commit is contained in:
Robin Gareus 2019-08-12 15:44:16 +02:00
parent 98c55a30c1
commit c0f0acaa9f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -246,7 +246,7 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const
filename_empty = false; filename_empty = false;
} }
if (include_format_name) { if (include_format_name && format) {
path += filename_empty ? "" : "_"; path += filename_empty ? "" : "_";
path += format->name(); path += format->name();
filename_empty = false; filename_empty = false;
@ -256,8 +256,10 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const
path = "export"; path = "export";
} }
path += "."; if (format) {
path += format->extension (); path += ".";
path += format->extension ();
}
path = legalize_for_universal_path (path); path = legalize_for_universal_path (path);