removed hardcoded ".ardour" suffix
This commit is contained in:
parent
877e518f05
commit
6e3e1738dd
@ -2311,7 +2311,7 @@ remove_end(string state)
|
||||
statename = statename.substr (start+1);
|
||||
}
|
||||
|
||||
if ((end = statename.rfind(".ardour")) == string::npos) {
|
||||
if ((end = statename.rfind(statefile_suffix)) == string::npos) {
|
||||
end = statename.length();
|
||||
}
|
||||
|
||||
@ -2497,7 +2497,12 @@ accept_all_state_files (const string& path, void* /*arg*/)
|
||||
return false;
|
||||
}
|
||||
|
||||
return (path.length() > 7 && path.find (".ardour") == (path.length() - 7));
|
||||
std::string const statefile_ext (statefile_suffix);
|
||||
if (path.length() >= statefile_ext.length()) {
|
||||
return (0 == path.compare (path.length() - statefile_ext.length(), statefile_ext.length(), statefile_ext));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user