From 7b926cd25d2023a9c8c3ce69242c484777a25d9f Mon Sep 17 00:00:00 2001 From: marques <20172333133@m.scnu.edu.cn> Date: Sun, 8 Jun 2025 17:21:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96examine=5Ffile=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E5=92=8C=E5=90=8E=E7=BC=80=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- func/utils/PublicFunc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/func/utils/PublicFunc.py b/func/utils/PublicFunc.py index 003ef6f..277a89f 100644 --- a/func/utils/PublicFunc.py +++ b/func/utils/PublicFunc.py @@ -178,8 +178,8 @@ class PublicFunc: @staticmethod def examine_file(path_str, filename, suffix): - temp_path = list( - Path(path_str).glob(f"{filename}*")) + temp_path = [p for p in Path(path_str).glob(f"{filename}*") if p.stem.startswith(filename) and p.suffix == suffix] + if len(temp_path) == 0: return Result().failure( info=Constants.INPUT_FAILURE + "\n" +