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" +