projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tracks doesn't know how to handle Engine (JACK) sync
[ardour.git]
/
libs
/
ardour
/
find_session.cc
diff --git
a/libs/ardour/find_session.cc
b/libs/ardour/find_session.cc
index afcbe7393b0f50c32e06fb0e6630d16b9e44b808..67aa43d071403df44785e9a9869852af16333287 100644
(file)
--- a/
libs/ardour/find_session.cc
+++ b/
libs/ardour/find_session.cc
@@
-32,6
+32,7
@@
#include "ardour/filename_extensions.h"
#include "ardour/utils.h"
#include "ardour/filename_extensions.h"
#include "ardour/utils.h"
+#include "ardour/session_utils.h"
#include "i18n.h"
#include "i18n.h"
@@
-116,7
+117,10
@@
find_session (string str, string& path, string& snapshot, bool& isnew)
suffix = snapshot.find (statefile_suffix);
suffix = snapshot.find (statefile_suffix);
- if (suffix == string::npos) {
+ const string::size_type start_pos_of_extension = snapshot.size () - strlen (statefile_suffix);
+ // we should check the start of extension position
+ // because files '*.ardour.bak' are possible
+ if (suffix != start_pos_of_extension) {
error << string_compose (_("%1 is not a snapshot file"), str) << endmsg;
return -1;
}
error << string_compose (_("%1 is not a snapshot file"), str) << endmsg;
return -1;
}