plugin scan progress-display & preferences
[ardour.git] / libs / ardour / session_state_utils.cc
index 136598efc4a8e78b5150cb43605f834c71c9af24..13d65e5b3c404d42187905637269bd78a809bea6 100644 (file)
@@ -40,23 +40,7 @@ namespace ARDOUR {
 bool
 create_backup_file (const std::string & file_path)
 {
-       if (!Glib::file_test (file_path, Glib::FILE_TEST_EXISTS)) return false;
-
-       Glib::RefPtr<Gio::File> backup_path = Gio::File::create_for_path(file_path + backup_suffix);
-       Glib::RefPtr<Gio::File> path = Gio::File::create_for_path(file_path);
-
-       try
-       {
-               path->copy (backup_path);
-       }
-       catch(const Glib::Exception& ex)
-       {
-               error << string_compose (_("Unable to create a backup copy of file %1 (%2)"),
-                               file_path, ex.what())
-                       << endmsg;
-               return false;
-       }
-       return true;
+       return copy_file (file_path, file_path + backup_suffix);
 }
 
 void