修复 bug

This commit is contained in:
eafonyang
2026-06-11 11:12:16 +08:00
parent 25a45c7cbd
commit 1ad4cd034a
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -102,6 +102,8 @@ upload_path() {
if [[ -d "$local_full" ]]; then
info "上传目录: ${rel_path}/ → ${SERVER}:${remote_path}/"
# 先删除远程同名目录,避免 scp 将目录嵌套到已有目录内
ssh $SSH_OPTS "$SERVER" "rm -rf '${remote_path}'"
scp $SCP_OPTS -r "$local_full" "${SERVER}:${remote_path}"
else
info "上传文件: ${rel_path}${SERVER}:${remote_path}"