Skip to content

Commit f86e165

Browse files
committed
Fix copy file to folder (#4075)
1 parent 942d4fa commit f86e165

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/huggingface_hub/hf_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12617,7 +12617,7 @@ def copy_files(self, source: str, destination: str, *, token: str | bool | None
1261712617

1261812618
destination_bucket_id = destination_handle.bucket_id
1261912619
destination_path = destination_handle.path
12620-
if destination_path == "":
12620+
if destination_path == "" or destination.endswith("/"):
1262112621
destination_is_directory = True
1262212622
else:
1262312623
# Check if destination path is an existing file or a directory in the bucket

0 commit comments

Comments
 (0)