From e0d8f8cf3ac5ae611a95550c649d1fb407c98463 Mon Sep 17 00:00:00 2001 From: diaoyunxi Date: Fri, 25 Sep 2026 12:35:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(cli):=20=E4=B8=8B=E8=BD=BD=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E6=97=B6=E6=97=A0=E6=95=88=E9=80=89=E6=8B=A9=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E8=AF=AF=E8=A6=86=E7=9B=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- pan123_cli.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 68af61b..f9d37ac 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ build/* .idea/* 123pan.exe 123pan.spec -android.py \ No newline at end of file +android.py__pycache__/ diff --git a/pan123_cli.py b/pan123_cli.py index c014322..5c75b49 100644 --- a/pan123_cli.py +++ b/pan123_cli.py @@ -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() # 换行