Skip to content

Commit 77122e2

Browse files
committed
Fix shutil move (#2433)
1 parent e63f31f commit 77122e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/huggingface_hub/file_download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ def _create_symlink(src: str, dst: str, new_blob: bool = False) -> None:
940940
# Symlinks are not supported => let's move or copy the file.
941941
if new_blob:
942942
logger.info(f"Symlink not supported. Moving file from {abs_src} to {abs_dst}")
943-
shutil.move(abs_src, abs_dst)
943+
shutil.move(abs_src, abs_dst, copy_function=_copy_no_matter_what)
944944
else:
945945
logger.info(f"Symlink not supported. Copying file from {abs_src} to {abs_dst}")
946946
shutil.copyfile(abs_src, abs_dst)

0 commit comments

Comments
 (0)