- 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;