Resolve issue of files not being deleted

Deletion of files was accidentally part of the previous if statement. It's been taken out of that block.
This commit is contained in:
Branislav Susila 2021-12-02 14:52:31 +01:00 committed by GitHub
parent d33e00f339
commit a787b08886
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -468,8 +468,8 @@ if ([:len [/system identity get name]] = 0 or [/system identity get name] = "Mik
} }
} }
} }
:delay 30s; :delay 30s;
}
# Cleanup will be performed if there are backup files AND at least one of the email or ftp upload had succeeded. # Cleanup will be performed if there are backup files AND at least one of the email or ftp upload had succeeded.
:if ($storedBackupsCounter > 0) do={ :if ($storedBackupsCounter > 0) do={
@ -477,7 +477,6 @@ if ([:len [/system identity get name]] = 0 or [/system identity get name] = "Mik
/file remove $mailAttachments; /file remove $mailAttachments;
:delay 2s; :delay 2s;
} }
}
# Fire RouterOs update process # Fire RouterOs update process
if ($isOsNeedsToBeUpdated = true and $storedBackupsCounter > 0) do={ if ($isOsNeedsToBeUpdated = true and $storedBackupsCounter > 0) do={