13
0

Use g_rename in AudioSource::rename_peakfile for portability

This commit is contained in:
Paul Davis 2013-07-15 12:41:24 -04:00
parent dca2774508
commit 4a8aadbbdf

View File

@ -202,7 +202,7 @@ AudioSource::rename_peakfile (string newpath)
string oldpath = peakpath;
if (Glib::file_test (oldpath, Glib::FILE_TEST_EXISTS)) {
if (rename (oldpath.c_str(), newpath.c_str()) != 0) {
if (g_rename (oldpath.c_str(), newpath.c_str()) != 0) {
error << string_compose (_("cannot rename peakfile for %1 from %2 to %3 (%4)"), _name, oldpath, newpath, strerror (errno)) << endmsg;
return -1;
}