Skip to content

Commit 9651f85

Browse files
authored
Merge pull request #5459 from ales-erjavec/fixes/runner-basedir-absolute-path
[FIX] Save File when workflow basedir is an empty string
2 parents 8aacb08 + 46e2a98 commit 9651f85

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Orange/canvas/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def main(argv=None):
4545
)
4646
widget_discovery.run(cfg.widgets_entry_points())
4747
model = cfg.workflow_constructor()
48-
model.set_runtime_env("basedir", os.path.dirname(filename))
48+
model.set_runtime_env(
49+
"basedir", os.path.abspath(os.path.dirname(filename))
50+
)
4951
sigprop = model.findChild(signalmanager.SignalManager)
5052
sigprop.pause() # Pause signal propagation during load
5153

Orange/widgets/utils/save/owsavebase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _abs_path_from_setting(self):
126126
if os.path.exists(self.stored_path):
127127
self.auto_save = False
128128
return self.stored_path
129-
elif workflow_dir:
129+
elif workflow_dir is not None:
130130
return os.path.normpath(
131131
os.path.join(workflow_dir, self.stored_path))
132132

0 commit comments

Comments
 (0)