fix: 修复保存路径解析逻辑,统一使用 resolve() 处理 saveto 参数

This commit is contained in:
2026-06-18 17:04:20 +08:00
parent 97b30ace84
commit cba7f9fb55

View File

@@ -116,7 +116,7 @@ def PPT_longPic(
new_img = img.resize((nwidth, nheight), resample=Image.Resampling.LANCZOS) new_img = img.resize((nwidth, nheight), resample=Image.Resampling.LANCZOS)
canvas.paste(new_img, box=(0, (i - 1) * nheight)) canvas.paste(new_img, box=(0, (i - 1) * nheight))
filepath = pptFile.parent if Path(saveto) == Path(".") else Path(saveto) filepath = Path(saveto).resolve()
if saveName: if saveName:
if Path(saveName).suffix: if Path(saveName).suffix:
canvas.save(filepath / saveName) canvas.save(filepath / saveName)