From 37c7909d874ea7c6688bcc3e0b4cd825b786504b Mon Sep 17 00:00:00 2001 From: narugo1992 Date: Mon, 29 Jul 2024 04:26:29 +0800 Subject: [PATCH] dev(narugo): fix upload --- hfutils/operate/upload.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hfutils/operate/upload.py b/hfutils/operate/upload.py index 750df8ee0f..259cfe8c63 100644 --- a/hfutils/operate/upload.py +++ b/hfutils/operate/upload.py @@ -135,7 +135,14 @@ def upload_directory_as_directory( if clear: pre_exist_files = { tuple(file.split('/')) for file in - list_files_in_repository(repo_id, repo_type, path_in_repo, revision, ignore_patterns, hf_token=hf_token) + list_files_in_repository( + repo_id=repo_id, + repo_type=repo_type, + subdir=path_in_repo, + revision=revision, + ignore_patterns=ignore_patterns, + hf_token=hf_token + ) } else: pre_exist_files = set()