Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Save File when workflow basedir is an empty string #5459

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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