Skip to content

Commit

Permalink
display file path on pre-calculate-hash worker failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Jan 25, 2025
1 parent ae5b00a commit 22c5270
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prime_backup/action/create_backup_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ def __pre_calculate_hash(self, session: DbSession, scan_result: _ScanResult):
self.__blob_by_size_cache.update(existence)

def hash_worker(pth: Path):
h = hash_utils.calc_file_hash(pth)
try:
h = hash_utils.calc_file_hash(pth)
except Exception as e:
self.logger.error('Failed to calculate hash for {!r}: {}'.format(str(pth), e))
raise
with hash_dict_lock:
hashes[pth] = h

Expand Down

0 comments on commit 22c5270

Please sign in to comment.