debugger.py -> abspath to absolute

This commit is contained in:
jdegenstein
2024-08-22 12:34:28 -05:00
committed by GitHub
parent 5d8f651f97
commit 9579757c98

View File

@@ -186,7 +186,7 @@ class Debugger(QObject, ComponentMixin):
def _exec(self, code, locals_dict, globals_dict): def _exec(self, code, locals_dict, globals_dict):
with ExitStack() as stack: with ExitStack() as stack:
fname = self.parent().components["editor"].filename fname = self.parent().components["editor"].filename
p = Path(fname if fname else "").abspath().dirname() p = Path(fname if fname else "").absolute().dirname()
if self.preferences["Add script dir to path"] and p.exists(): if self.preferences["Add script dir to path"] and p.exists():
sys.path.insert(0, p) sys.path.insert(0, p)