diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:08:29 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:08:29 +0000 |
commit | 695b66643064e7d1d98b65c72d2161914f28773c (patch) | |
tree | 998f2664aa583884137d56a466935b14e2c9b319 /libs/ardour/session_state.cc | |
parent | d1fc7aa459df62fcf050ecd731db0e6bdc00c090 (diff) |
Don't try to remove pending state file if the file doesn't exist
git-svn-id: svn://localhost/ardour2/branches/3.0@12869 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 39a73d7006..2eb2bc55c0 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -632,6 +632,8 @@ Session::remove_pending_capture_state () pending_state_file_path = Glib::build_filename (pending_state_file_path, legalize_for_path (_current_snapshot_name) + pending_suffix); + if (!Glib::file_test (pending_state_file_path, Glib::FILE_TEST_EXISTS)) return; + if (g_remove (pending_state_file_path.c_str()) != 0) { error << string_compose(_("Could not remove pending capture state at path \"%1\" (%2)"), pending_state_file_path, g_strerror (errno)) << endmsg; |