13
0

don't try (and fail) to rename the history file if it doesn't exist

git-svn-id: svn://localhost/ardour2/branches/3.0@9892 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-07-18 15:04:00 +00:00
parent 8426588d6e
commit 5d8cf17121

View File

@ -3774,7 +3774,10 @@ Session::rename (const std::string& new_name)
/* history file */
oldstr = Glib::build_filename (newpath, _current_snapshot_name) + history_suffix;
if (Glib::file_test (oldstr, Glib::FILE_TEST_EXISTS)) {
newstr = Glib::build_filename (newpath, legal_name) + history_suffix;
cerr << "Rename " << oldstr << " => " << newstr << endl;
@ -3782,6 +3785,7 @@ Session::rename (const std::string& new_name)
if (RENAME (oldstr.c_str(), newstr.c_str()) != 0) {
return 1;
}
}
_path = newpath;
_current_snapshot_name = new_name;