修复了路径不存在时无法正确创建文件夹的问题

This commit is contained in:
2025-05-29 14:05:52 +08:00
parent 6b7ba17c6a
commit b01e2f1161
13 changed files with 25 additions and 38 deletions

View File

@ -323,9 +323,6 @@ class Data:
return Result().success(info=Constants.CUT_PSG_ALIGN_LABEL_FINISHED)
def save(self):
if (not Path(Config["Path"]["SaveFolder"]).exists()) or (not Path(Config["Path"]["SaveFolder"]).is_dir()):
Path(Config["Path"]["SaveFolder"]).mkdir(parents=True, exist_ok=True)
for raw in self.raw.values():
if len(raw) == 0:
return Result().failure(info=Constants.SAVE_FAILURE +