fix(step3/step7): 路径断层闭环 — _safe_rename换用os.rename、generate_sampling_points入口强制.bsq后缀校验

This commit is contained in:
DXC
2026-05-10 16:04:26 +08:00
parent 95d30d8d81
commit abac272b31
2 changed files with 7 additions and 3 deletions

View File

@ -47,6 +47,9 @@ class PredictionStep:
if deglint_img_path is None:
raise ValueError("必须提供 deglint_img_path 参数")
# 强制后缀校验:无论用户 UI 传入 .dat/.tif/.bsq统一规范为 .bsq
deglint_img_path = str(Path(deglint_img_path).with_suffix('.bsq'))
if Path(output_path).exists():
print(f"检测到已存在的采样点光谱数据文件,直接使用: {output_path}")
notify("skipped", f"采样点光谱数据已设置: {output_path}")