summaryrefslogtreecommitdiff
path: root/libs/ardour/file_source.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-07-21 13:03:50 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-07-21 13:03:50 +0000
commit7ab8dbc2fe679d75821ca585dd7c2663f640116e (patch)
tree145d0bafc666a3efa138a428ba262d5076a443b3 /libs/ardour/file_source.cc
parent6ef49a0b86e746e8f0f8617998a2a3bb781576cd (diff)
fix up file renaming code a little bit
git-svn-id: svn://localhost/ardour2/branches/3.0@7460 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/file_source.cc')
-rw-r--r--libs/ardour/file_source.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc
index 2fd978e172..d0eb64b8aa 100644
--- a/libs/ardour/file_source.cc
+++ b/libs/ardour/file_source.cc
@@ -395,11 +395,11 @@ FileSource::set_source_name (const ustring& newname, bool destructive)
error << string_compose (_("Programming error! %1 tried to rename a file over another file! It's safe to continue working, but please report this to the developers."), PROGRAM_NAME) << endmsg;
return -1;
}
-
- if (::rename (oldpath.c_str(), newpath.c_str()) != 0) {
- error << string_compose (_("cannot rename audio file %1 to %2"), _name, newpath) << endmsg;
- return -1;
- }
+
+ if (::rename (oldpath.c_str(), newpath.c_str()) != 0) {
+ error << string_compose (_("cannot rename file %1 to %2 (%3)"), oldpath, newpath, strerror(errno)) << endmsg;
+ return -1;
+ }
_name = Glib::path_get_basename (newpath);
_path = newpath;