[core] Log number of deleted files (if any)

This commit is contained in:
derrod 2021-10-21 14:10:14 +02:00
parent 964ee08d05
commit 8181f9faeb

View file

@ -909,10 +909,14 @@ class LegendaryCore:
self.log.debug(f'Marking orphaned chunk {fname} for deletion.')
deletion_list.append(fname)
self.log.info('Deleting unused/broken files...')
for fname in deletion_list:
self.log.debug(f'Deleting {fname}')
self.egs.delete_game_cloud_save_file(fname)
if deletion_list:
self.log.info('Deleting unused/broken files...')
for fname in deletion_list:
self.log.debug(f'Deleting {fname}')
self.egs.delete_game_cloud_save_file(fname)
self.log.info(f'Deleted {len(deletion_list)} files.')
else:
self.log.info('Nothing to delete.')
self.log.info('Successfully completed savegame cleanup.')