summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-03-24 14:10:14 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-03-24 14:10:39 -0600
commit5f1d802307c7e68ebc39ff4d4f4a534333f98f41 (patch)
tree9371435df620e685d4f7ffc0c7cf3d7935564ba0 /libs/ardour/session_state.cc
parente9be6c23a87e53b825357849576636bdb5e40787 (diff)
when saving an unnamed session, rename it
Note that this is done at the GUI level, might need to double check if there are other paths into a "save" that should be covered. Control surfaces use the action, but Lua comes to mind
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index f82962ef3d..df4922a4ae 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -950,9 +950,6 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot
remove_pending_capture_state ();
}
- /* remove unnamed file name, if any (it's not an error if it doesn't exist */
- ::g_unlink (unnamed_file_name().c_str());
-
return 0;
}
@@ -4535,6 +4532,9 @@ Session::rename (const std::string& new_name)
store_recent_sessions (new_name, _path);
+ /* remove unnamed file name, if any (it's not an error if it doesn't exist) */
+ ::g_unlink (unnamed_file_name().c_str());
+
return 0;
}
@@ -5657,7 +5657,7 @@ Session::unnamed_file_name() const
}
bool
-Session::not_named() const
+Session::unnamed() const
{
return Glib::file_test (unnamed_file_name(), Glib::FILE_TEST_EXISTS);
}