diff options
author | Robin Gareus <robin@gareus.org> | 2019-08-12 15:44:16 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-08-12 15:44:16 +0200 |
commit | c0f0acaa9fd4c302e1f499560233fe20174b95f7 (patch) | |
tree | f0ddca1189d5af1885fcbbc4310b4497cdbc66d9 /libs | |
parent | 98c55a30c1f590b87f136b652d0fd5a2887187a1 (diff) |
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.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/export_filename.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index 97451792b7..77dd9256f0 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -246,7 +246,7 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const filename_empty = false; } - if (include_format_name) { + if (include_format_name && format) { path += filename_empty ? "" : "_"; path += format->name(); filename_empty = false; @@ -256,8 +256,10 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const path = "export"; } - path += "."; - path += format->extension (); + if (format) { + path += "."; + path += format->extension (); + } path = legalize_for_universal_path (path); |