Use g_strerror() instead of ::strerror() in Session::cleanup_sources
authorTim Mayberry <mojofunk@gmail.com>
Wed, 14 Sep 2016 11:31:31 +0000 (21:31 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Thu, 15 Sep 2016 11:27:55 +0000 (21:27 +1000)
The error is generated by a glib function so use the glib version of this
function(it also consistent with usage in the rest the file).

libs/ardour/session_state.cc

index f518d4e50258f073591a1528e7a425e677af4fec..5729c889bd8380bfc88cd506284b03eadaa87a79 100644 (file)
@@ -3307,7 +3307,7 @@ Session::cleanup_sources (CleanupReport& rep)
                if (0 == g_stat ((*x).c_str(), &statbuf)) {
 
                        if (::g_rename ((*x).c_str(), newpath.c_str()) != 0) {
-                               error << string_compose (_("cannot rename unused file source from %1 to %2 (%3)"), (*x), newpath, strerror (errno)) << endmsg;
+                               error << string_compose (_("cannot rename unused file source from %1 to %2 (%3)"), (*x), newpath, g_strerror (errno)) << endmsg;
                                continue;
                        }
 
@@ -3324,7 +3324,7 @@ Session::cleanup_sources (CleanupReport& rep)
                        if (Glib::file_test (peakpath.c_str(), Glib::FILE_TEST_EXISTS)) {
                                if (::g_unlink (peakpath.c_str()) != 0) {
                                        error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"),
-                                                                                                                        peakpath, _path, strerror (errno))
+                                                                                                                        peakpath, _path, g_strerror (errno))
                                                  << endmsg;
                                        /* try to back out */
                                        ::g_rename (newpath.c_str(), _path.c_str());