projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4535b6a
)
Use PBD::sys::path instead of PBD::copy_file in Session::save_state
author
Tim Mayberry
<mojofunk@gmail.com>
Tue, 4 Sep 2007 04:48:23 +0000
(
04:48
+0000)
committer
Tim Mayberry
<mojofunk@gmail.com>
Tue, 4 Sep 2007 04:48:23 +0000
(
04:48
+0000)
git-svn-id: svn://localhost/ardour2/trunk@2379
d708f5d6
-7413-0410-9779-
e7cbd77b26cf
libs/ardour/session_state.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/session_state.cc
b/libs/ardour/session_state.cc
index 80c427076c4a21c5acb14efdeddb73080201fd08..20da435fc4cf3a62576eab9f8c24311dc1b220d1 100644
(file)
--- a/
libs/ardour/session_state.cc
+++ b/
libs/ardour/session_state.cc
@@
-608,7
+608,17
@@
Session::save_state (string snapshot_name, bool pending)
bak_path /= snapshot_name + statefile_suffix + backup_suffix;
if (sys::exists (xml_path)) {
- copy_file (xml_path.to_string(), bak_path.to_string());
+ try
+ {
+ sys::copy_file (xml_path, bak_path);
+ }
+ catch(sys::filesystem_error& ex)
+ {
+ error << string_compose (_("Unable to make backup of state file %1 (%2)"),
+ xml_path.to_string(), ex.what())
+ << endmsg;
+ return -1;
+ }
}
} else {