Improve semantics as suggested by decentral1se

This commit is contained in:
Alexandre Aubin 2019-06-18 15:41:27 +02:00 committed by GitHub
parent 46e388460c
commit 9d63a067be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2322,8 +2322,8 @@ def backup_delete(name):
files_to_delete = [archive_file, info_file] files_to_delete = [archive_file, info_file]
# To handle the case where archive_file is in fact a symlink # To handle the case where archive_file is in fact a symlink
actual_archive = os.path.realpath(archive_file) if os.islink(archive_file):
if actual_archive != archive_file: actual_archive = os.path.realpath(archive_file)
files_to_delete.append(actual_archive) files_to_delete.append(actual_archive)
for backup_file in files_to_delete: for backup_file in files_to_delete: