Skip to content

Commit

Permalink
[F] Fix rehash
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed May 16, 2024
1 parent 882dafd commit 4707704
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/build_rehash.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ def rehash(path: Path, blocksize: int = 1 << 20) -> Tuple[str, str]:
new_record = []
for file in order:
file = base_path / file.split(',')[0]
digest, length = rehash(file)
new_record.append(f"{str(file.relative_to(base_path)).replace("\\", "/")},{digest},{length}")
processed.add(file)
if file.exists():
digest, length = rehash(file)
new_record.append(f"{str(file.relative_to(base_path)).replace("\\", "/")},{digest},{length}")
processed.add(file)

for file in base_path.rglob('*'):
if file.is_file() and file not in processed:
Expand Down

0 comments on commit 4707704

Please sign in to comment.