Document.open relative path?

Hi list,

on Debian Linux I am trying to execute
Document.open(“somefile.scd”);
from within a file which is in the same directory as the above.
This will throw an error along the lines of
Primitive ‘_FileLength’ failed.

Evaluating
Document.dir
returns nothing. When I set it to the path of the currently edited
document:
Document.dir = Document.current.dir.postln;
the above Document.open call will work.

Is this standard behavior? How can I open a file relative to the
currently edited document without explicitely setting Document.dir
first?

Thank you for all ideas!
best, P

I’d suggest Document.open(thisProcess.nowExecutingPath.dirname +/+ "the_file.scd")

hjh

Or, you can use the method that wraps it: Document.open("the_file.scd".resolveRelative).