修复所有 Panel 的相对路径传递问题,防止 FileNotFoundError
This commit is contained in:
@ -230,6 +230,9 @@ class Step6_5Panel(QWidget):
|
||||
if main_window and hasattr(main_window, 'step5_panel'):
|
||||
step5_output_path = main_window.step5_panel.output_file.get_path()
|
||||
if step5_output_path:
|
||||
# 若为相对路径,使用 work_dir 合成为绝对路径
|
||||
if not os.path.isabs(step5_output_path):
|
||||
step5_output_path = os.path.join(self.work_dir or '', step5_output_path).replace('\\', '/')
|
||||
existing = self.training_csv_file.get_path()
|
||||
if not existing or not existing.strip():
|
||||
self.training_csv_file.set_path(step5_output_path)
|
||||
|
||||
Reference in New Issue
Block a user