From c8d92e4ead3511e6dec6738f11d674aea5a01fbe Mon Sep 17 00:00:00 2001 From: Ales Erjavec Date: Fri, 28 May 2021 14:23:01 +0200 Subject: [PATCH 1/2] owsavebase: Fix check for workflow_dir --- Orange/widgets/utils/save/owsavebase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Orange/widgets/utils/save/owsavebase.py b/Orange/widgets/utils/save/owsavebase.py index 3fbc4e8b444..0f7d5866981 100644 --- a/Orange/widgets/utils/save/owsavebase.py +++ b/Orange/widgets/utils/save/owsavebase.py @@ -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)) From 46e2a98857061d35d0dfe65f34c96e85545db717 Mon Sep 17 00:00:00 2001 From: Ales Erjavec Date: Fri, 28 May 2021 14:26:48 +0200 Subject: [PATCH 2/2] run: Always use absolute path for 'basedir' --- Orange/canvas/run.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Orange/canvas/run.py b/Orange/canvas/run.py index 299354435ef..dacda3d7b02 100644 --- a/Orange/canvas/run.py +++ b/Orange/canvas/run.py @@ -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