summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-03-12 08:49:18 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-03-12 08:49:18 -0400
commit9f98837255da3de058dd3273655535c6b5d997f4 (patch)
tree1f1007731568eb655066b535863e78879eea0ad9 /libs
parent36160b88cd3416877b8715ad86d26d9646fcd193 (diff)
more error messages if session renaming fails, and remove stupid use of RENAME macro and use ::g_rename() instead
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session_state.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 3e117f61d3..47971bf633 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -3602,8 +3602,6 @@ Session::rename (const std::string& new_name)
string const old_sources_root = _session_dir->sources_root();
-#define RENAME ::rename
-
/* Rename:
* session directory
@@ -3665,7 +3663,8 @@ Session::rename (const std::string& new_name)
cerr << "Rename " << oldstr << " => " << newstr << endl;
- if (RENAME (oldstr.c_str(), newstr.c_str()) != 0) {
+ if (::g_rename (oldstr.c_str(), newstr.c_str()) != 0) {
+ error << string_compose (_("renaming %s as %2 failed (%3)"), oldstr, newstr, g_strerror (errno)) << endmsg;
return 1;
}
@@ -3692,7 +3691,8 @@ Session::rename (const std::string& new_name)
cerr << "Rename " << oldstr << " => " << newstr << endl;
- if (RENAME (oldstr.c_str(), newstr.c_str()) != 0) {
+ if (::g_rename (oldstr.c_str(), newstr.c_str()) != 0) {
+ error << string_compose (_("renaming %s as %2 failed (%3)"), oldstr, newstr, g_strerror (errno)) << endmsg;
return 1;
}
}
@@ -3704,7 +3704,8 @@ Session::rename (const std::string& new_name)
cerr << "Rename " << oldstr << " => " << newstr << endl;
- if (RENAME (oldstr.c_str(), newstr.c_str()) != 0) {
+ if (::g_rename (oldstr.c_str(), newstr.c_str()) != 0) {
+ error << string_compose (_("renaming %s as %2 failed (%3)"), oldstr, newstr, g_strerror (errno)) << endmsg;
return 1;
}
@@ -3718,7 +3719,8 @@ Session::rename (const std::string& new_name)
cerr << "Rename " << oldstr << " => " << newstr << endl;
- if (RENAME (oldstr.c_str(), newstr.c_str()) != 0) {
+ if (::g_rename (oldstr.c_str(), newstr.c_str()) != 0) {
+ error << string_compose (_("renaming %s as %2 failed (%3)"), oldstr, newstr, g_strerror (errno)) << endmsg;
return 1;
}
}
@@ -3754,8 +3756,6 @@ Session::rename (const std::string& new_name)
store_recent_sessions (new_name, _path);
return 0;
-
-#undef RENAME
}
int