mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 12:45:45 +01:00
Don't try to rename the route template state dir if it doesn't exist
This commit is contained in:
parent
adc2c756e6
commit
b03ee727e9
1 changed files with 5 additions and 3 deletions
|
|
@ -568,9 +568,11 @@ RouteTemplateManager::rename_template (TreeModel::iterator& item, const Glib::us
|
|||
const string new_state_dir = Glib::build_filename (user_route_template_directory(), new_name);
|
||||
|
||||
if (adjusted) {
|
||||
if (g_rename (old_state_dir.c_str(), new_state_dir.c_str()) != 0) {
|
||||
error << string_compose (_("Could not rename state dir \"%1\" to \"%22\": %3"), old_state_dir, new_state_dir, strerror (errno)) << endmsg;
|
||||
return;
|
||||
if (g_file_test (old_state_dir.c_str(), G_FILE_TEST_EXISTS)) {
|
||||
if (g_rename (old_state_dir.c_str(), new_state_dir.c_str()) != 0) {
|
||||
error << string_compose (_("Could not rename state dir \"%1\" to \"%22\": %3"), old_state_dir, new_state_dir, strerror (errno)) << endmsg;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue