Use g_strerror instead of strerror in ARDOUR::FileSource

For consistency when calling glib functions and to get UTF-8 strings for
display.
This commit is contained in:
Tim Mayberry
2016-09-15 20:17:44 +10:00
parent 331bfef416
commit d36c41f128

View File

@@ -210,7 +210,7 @@ FileSource::move_to_trash (const string& trash_dir_name)
if (::g_rename (_path.c_str(), newpath.c_str()) != 0) {
PBD::error << string_compose (
_("cannot rename file source from %1 to %2 (%3)"),
_path, newpath, strerror (errno)) << endmsg;
_path, newpath, g_strerror (errno)) << endmsg;
return -1;
}
@@ -486,7 +486,7 @@ FileSource::find_2X (Session& s, DataType type, const string& path, bool must_ex
if (must_exist) {
error << string_compose(
_("Filesource: cannot find required file (%1): %2"),
path, strerror (errno)) << endmsg;
path, g_strerror (errno)) << endmsg;
goto out;
}
@@ -494,7 +494,7 @@ FileSource::find_2X (Session& s, DataType type, const string& path, bool must_ex
if (errno != ENOENT) {
error << string_compose(
_("Filesource: cannot check for existing file (%1): %2"),
path, strerror (errno)) << endmsg;
path, g_strerror (errno)) << endmsg;
goto out;
}
#endif
@@ -595,7 +595,7 @@ FileSource::rename (const string& newpath)
if (Glib::file_test (oldpath.c_str(), Glib::FILE_TEST_EXISTS)) {
/* rename only needed if file exists on disk */
if (::g_rename (oldpath.c_str(), newpath.c_str()) != 0) {
error << string_compose (_("cannot rename file %1 to %2 (%3)"), oldpath, newpath, strerror(errno)) << endmsg;
error << string_compose (_("cannot rename file %1 to %2 (%3)"), oldpath, newpath, g_strerror(errno)) << endmsg;
return -1;
}
}