Skip to content
Merged
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
5 changes: 3 additions & 2 deletions orangecanvas/application/canvasmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,8 @@ def new_scheme_from_contents_and_path(
workflow: Optional[Scheme]
"""
new_scheme = config.workflow_constructor(parent=self)
new_scheme.set_runtime_env("basedir", os.path.dirname(path))
new_scheme.set_runtime_env(
"basedir", os.path.abspath(os.path.dirname(path)))
errors = [] # type: List[Exception]
try:
new_scheme.load_from(
Expand Down Expand Up @@ -1508,7 +1509,7 @@ def save_scheme_to(self, scheme, filename):
# existing scheme file if `scheme.save_to` raises an error.
buffer = io.BytesIO()
try:
scheme.set_runtime_env("basedir", dirname)
scheme.set_runtime_env("basedir", os.path.abspath(dirname))
scheme.save_to(buffer, pretty=True, pickle_fallback=True)
except Exception:
log.error("Error saving %r to %r", scheme, filename, exc_info=True)
Expand Down