Skip to content

Commit

Permalink
Merge PR #1155: Clicking "Ignore" button doesn't removes backup
Browse files Browse the repository at this point in the history
Fix #1140: Clicking "Ignore" button doesn't removes backup
  • Loading branch information
ice0 committed Feb 13, 2020
2 parents b4b6a75 + 93f2532 commit 474fc99
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions synfig-studio/src/gui/autorecover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,13 @@ AutoRecover::clear_backups()
// FileSystemTemporary will clear opened temporary files in destructor
String filename = App::get_temporary_directory() + ETL_DIRECTORY_SEPARATOR + *i;
bool s = false;
try { s = FileSystemTemporary("").open_temporary(filename); }
catch (...) { }
try {
FileSystemTemporary temporary_filesystem = FileSystemTemporary("");
s = temporary_filesystem.open_temporary(filename);
temporary_filesystem.discard_changes();
} catch (...) {
synfig::warning("Autobackup file is not recoverable. Forcing to remove.");
}
if (!s)
{
FileSystemNative::instance()->file_remove(filename);
Expand Down

0 comments on commit 474fc99

Please sign in to comment.