DL fix again
This commit is contained in:
@@ -37,7 +37,8 @@ def compute_shard_checksum(shard_dir: Path) -> str:
|
||||
|
||||
def write_shard_archive(shard_dir: Path, out_file: Any) -> None:
|
||||
"""Write a tar archive for *shard_dir* to a binary file-like object."""
|
||||
with tarfile.open(fileobj=out_file, mode="w|") as archive:
|
||||
# dereference: HF cache snapshots are symlinks into blobs/ — ship contents.
|
||||
with tarfile.open(fileobj=out_file, mode="w|", dereference=True) as archive:
|
||||
for path in sorted(p for p in shard_dir.rglob("*") if p.is_file()):
|
||||
archive.add(path, arcname=path.relative_to(shard_dir).as_posix())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user