diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-06-09 22:55:07 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-06-09 22:55:07 +0200 |
commit | 24b6d28baf559e151fc96ce2c15d17dfd78da479 (patch) | |
tree | 6dfc34734f3fc10a89ea66304795da4fb51fb7e2 /pyload/InitHomeDir.py | |
parent | fixing imports when changing cwd (diff) | |
download | pyload-24b6d28baf559e151fc96ce2c15d17dfd78da479.tar.xz |
fixed start scripts
Diffstat (limited to 'pyload/InitHomeDir.py')
-rw-r--r-- | pyload/InitHomeDir.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pyload/InitHomeDir.py b/pyload/InitHomeDir.py index 3554497d3..c255913de 100644 --- a/pyload/InitHomeDir.py +++ b/pyload/InitHomeDir.py @@ -31,7 +31,10 @@ __builtin__.pypath = path.abspath(path.join(__file__, "..", "..")) # Before changing the cwd, the abspath of the module must be manifested if 'pyload' in sys.modules: - sys.modules['pyload'].__path__.append(path.abspath(sys.modules['pyload'].__path__[0])) + rel_pyload = sys.modules['pyload'].__path__[0] + abs_pyload = path.abspath(rel_pyload) + if abs_pyload != rel_pyload: + sys.modules['pyload'].__path__.insert(0, abs_pyload) sys.path.append(join(pypath, "pyload", "lib")) |