From 0ad7c2ecc917707171b22e15839eedb1c0c3460a Mon Sep 17 00:00:00 2001 From: jbwfu <75001777+jbwfu@users.noreply.github.com> Date: Sat, 7 Feb 2026 01:09:24 +0800 Subject: [PATCH] fix: correct directory target path --- custom/sync.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom/sync.py b/custom/sync.py index 403a5f4..b20b2fa 100644 --- a/custom/sync.py +++ b/custom/sync.py @@ -89,6 +89,11 @@ def sync_git_file(args, repo_url, env): file_path = args.path dest = args.target_path + if os.path.isdir(dest) or dest.endswith(os.sep) or (os.altsep and dest.endswith(os.altsep)): + filename = os.path.basename(file_path) + dest = os.path.join(dest, filename) + print(f"检测到目标路径为目录 '{args.target_path}',自动修正为: '{dest}'") + branch = args.branch if not branch: branch = get_remote_default_branch(repo_url, env)