fix(cli): 下载冲突时无效选择不再误覆盖文件

This commit is contained in:
diaoyunxi
2026-09-25 12:35:26 +08:00
parent 228b5017c1
commit e0d8f8cf3a
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -7,4 +7,4 @@ build/*
.idea/*
123pan.exe
123pan.spec
android.py
android.py__pycache__/
+4
View File
@@ -355,6 +355,10 @@ class Pan123CLI:
return
elif choice == "3":
self._download_mode = 3
elif choice != "1":
# 非有效选项(1/2/3/4)一律取消,避免误覆盖
print("无效选择,已取消下载")
return
r = self.tool.download_file(idx, on_progress=self._download_progress, overwrite=True)
print() # 换行