Merge pull request #1381 from YunoHost/fix-backup_delete

fix backup_delete when compress_tar_archives is True
This commit is contained in:
Kayou 2021-12-09 11:09:24 +01:00 committed by GitHub
commit e3015765b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2592,7 +2592,7 @@ def backup_delete(name):
hook_callback("pre_backup_delete", args=[name])
archive_file = "%s/%s.tar" % (ARCHIVES_PATH, name)
if os.path.exists(archive_file + ".gz"):
if not os.path.exists(archive_file) and os.path.exists(archive_file + ".gz"):
archive_file += ".gz"
info_file = "%s/%s.info.json" % (ARCHIVES_PATH, name)