summaryrefslogtreecommitdiffstats
path: root/pyload/InitHomeDir.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 22:02:05 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 22:02:05 +0200
commit4a6ad17cd7ad5775d76794f1c598e3cbc9bdd2de (patch)
tree4e6e89cf51ca262d0d1d93b94338db80bd79183a /pyload/InitHomeDir.py
parentadded missing files, moved remaining plugins (diff)
downloadpyload-4a6ad17cd7ad5775d76794f1c598e3cbc9bdd2de.tar.xz
fixing imports when changing cwd
Diffstat (limited to 'pyload/InitHomeDir.py')
-rw-r--r--pyload/InitHomeDir.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pyload/InitHomeDir.py b/pyload/InitHomeDir.py
index 8fca42196..3554497d3 100644
--- a/pyload/InitHomeDir.py
+++ b/pyload/InitHomeDir.py
@@ -29,6 +29,11 @@ import __builtin__
__builtin__.owd = path.abspath("") #original working directory
__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]))
+
+
sys.path.append(join(pypath, "pyload", "lib"))
homedir = ""