Skip to content

Commit

Permalink
Stop recreating backup file when closing and stripping trailing space
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten committed Jun 27, 2023
1 parent 406361d commit 5cb4188
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Services/Document.vala
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ namespace Scratch.Services {

if (ret_value) {
// Delete backup copy file
loaded = false; // Stops recreating backup when trailing space stripped
delete_backup ();
doc_closed ();
}
Expand Down Expand Up @@ -1005,7 +1006,7 @@ namespace Scratch.Services {

// Backup functions
private void create_backup () {
if (!can_write ()) {
if (!can_write () || !loaded) {
return;
}

Expand Down

0 comments on commit 5cb4188

Please sign in to comment.