mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Fix testing for session files
The clause that was added in b65fe35f67 to allow passing
FQN including .ardour suffix on the comandline.
As side-effect this prevented loading sessions that were named
after a folder inside the session-bundle. e.g. "plugin" or
"interchage" or "dead" etc.
This commit is contained in:
parent
3361d073d3
commit
a56b4e5aeb
1 changed files with 3 additions and 3 deletions
|
|
@ -983,7 +983,7 @@ Session::load_state (string snapshot_name, bool from_template)
|
|||
std::string xmlpath(_session_dir->root_path());
|
||||
xmlpath = Glib::build_filename (xmlpath, legalize_for_path (snapshot_name + pending_suffix));
|
||||
|
||||
if (Glib::file_test (xmlpath, Glib::FILE_TEST_EXISTS)) {
|
||||
if (Glib::file_test (xmlpath, Glib::FILE_TEST_IS_REGULAR)) {
|
||||
|
||||
/* there is pending state from a crashed capture attempt */
|
||||
|
||||
|
|
@ -999,9 +999,9 @@ Session::load_state (string snapshot_name, bool from_template)
|
|||
xmlpath = Glib::build_filename (_session_dir->root_path(), snapshot_name);
|
||||
}
|
||||
|
||||
if (!Glib::file_test (xmlpath, Glib::FILE_TEST_EXISTS)) {
|
||||
if (!Glib::file_test (xmlpath, Glib::FILE_TEST_IS_REGULAR)) {
|
||||
xmlpath = Glib::build_filename (_session_dir->root_path(), legalize_for_path (snapshot_name + statefile_suffix));
|
||||
if (!Glib::file_test (xmlpath, Glib::FILE_TEST_EXISTS)) {
|
||||
if (!Glib::file_test (xmlpath, Glib::FILE_TEST_IS_REGULAR)) {
|
||||
error << string_compose(_("%1: session file \"%2\" doesn't exist!"), _name, xmlpath) << endmsg;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue