Fallback to the default export path when the saved export path is not found.

Previously we would end up with an export path of top level session
directory.
This commit is contained in:
Todd Naugle 2021-05-07 12:25:26 -05:00
parent 9e6b85f330
commit d2ba90b2c1
1 changed files with 3 additions and 2 deletions

View File

@ -128,8 +128,9 @@ ExportFilename::set_state (const XMLNode & node)
if (child->get_property ("path", tmp)) {
tmp = Glib::build_filename (folder, tmp);
if (!Glib::file_test (tmp, Glib::FILE_TEST_EXISTS)) {
warning << string_compose (_("Existing export folder for this session (%1) does not exist - ignored"), tmp) << endmsg;
} else {
warning << string_compose (_("Existing export folder for this session (%1) does not exist - using default"), tmp) << endmsg;
folder = session.session_directory().export_path();
} else {
folder = tmp;
}
}