Skip to content

Commit

Permalink
Merge pull request #5459 from ales-erjavec/fixes/runner-basedir-absol…
Browse files Browse the repository at this point in the history
…ute-path

[FIX] Save File when workflow basedir is an empty string
  • Loading branch information
janezd authored Jun 4, 2021
2 parents 8aacb08 + 46e2a98 commit 9651f85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Orange/canvas/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def main(argv=None):
)
widget_discovery.run(cfg.widgets_entry_points())
model = cfg.workflow_constructor()
model.set_runtime_env("basedir", os.path.dirname(filename))
model.set_runtime_env(
"basedir", os.path.abspath(os.path.dirname(filename))
)
sigprop = model.findChild(signalmanager.SignalManager)
sigprop.pause() # Pause signal propagation during load

Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/utils/save/owsavebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _abs_path_from_setting(self):
if os.path.exists(self.stored_path):
self.auto_save = False
return self.stored_path
elif workflow_dir:
elif workflow_dir is not None:
return os.path.normpath(
os.path.join(workflow_dir, self.stored_path))

Expand Down

0 comments on commit 9651f85

Please sign in to comment.