Skip to content
Snippets Groups Projects
Commit 5372be3d authored by Florent Thiery's avatar Florent Thiery
Browse files

Remove empty backup folders upon discovery, refs #23246

parent d63feb70
No related branches found
No related tags found
No related merge requests found
...@@ -93,6 +93,8 @@ def check_backup_is_incremental(path): ...@@ -93,6 +93,8 @@ def check_backup_is_incremental(path):
print('%s: %s' % (d, num_folders)) print('%s: %s' % (d, num_folders))
if num_folders == 0: if num_folders == 0:
print('Folder %s is empty, this indicates non-incremental backups (we are expecting links)' % folder_path) print('Folder %s is empty, this indicates non-incremental backups (we are expecting links)' % folder_path)
os.rmdir(folder_path)
print('Folder removed')
return False return False
return True return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment