"internal:storage", "").get("search_path", "")
# another fallback root path, this time from the universe startdir
- if not root_path and hasattr(universe, "startdir"):
- root_path = universe.startdir
+ if hasattr(universe, "startdir"):
+ if not root_path:
+ root_path = universe.startdir
+ elif not os.path.isabs(root_path):
+ root_path = os.path.join(universe.startdir, root_path)
# when no root path is specified, assume the current working directory
if not root_path:
root_path = os.getcwd()
- # otherwise, make sure it's absolute
- elif not os.path.isabs(root_path):
- root_path = os.path.realpath(root_path)
+ # make sure it's absolute
+ root_path = os.path.realpath(root_path)
# if there's no search path, just use the root path and etc
if not search_path: