Skip to content

Commit

Permalink
Merge branch 'master' into fix-folder-manager-update
Browse files Browse the repository at this point in the history
  • Loading branch information
colinkiama committed Dec 17, 2023
2 parents f29e2a9 + cadc14e commit ba76403
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Services/Document.vala
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ namespace Scratch.Services {
private ulong onchange_handler_id = 0; // It is used to not mark files as changed on load
private bool loaded = false;
private bool mounted = true; // Mount state of the file
private bool closing = false;
private Mount mount;
private Icon locked_icon;

Expand Down Expand Up @@ -468,6 +469,7 @@ namespace Scratch.Services {

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

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

Expand Down

0 comments on commit ba76403

Please sign in to comment.