优化文件路径检查逻辑,修正路径引用方式以确保文件存在性验证

This commit is contained in:
2025-12-20 13:20:55 +08:00
parent 800c68655f
commit ee45d1d351

View File

@ -309,7 +309,7 @@ class Data:
"Input_SA_Label", "Input_Stage"] "Input_SA_Label", "Input_Stage"]
for file_key in check_file_list: for file_key in check_file_list:
if (not self.config["Path"][file_key].is_file()) or (not self.config["Path"][file_key].exists()): if (not Path(self.config["Path"][file_key]).is_file()) or (not Path(self.config["Path"][file_key]).exists()):
return Result().failure(info=Constants.INPUT_FAILURE + "\n" + return Result().failure(info=Constants.INPUT_FAILURE + "\n" +
str(self.config["Path"][file_key]) + file_key + str(self.config["Path"][file_key]) + file_key +
Constants.FAILURE_REASON["Path_Not_Exist"]) Constants.FAILURE_REASON["Path_Not_Exist"])