summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
Diffstat (limited to 'pyload')
-rw-r--r--pyload/InitHomeDir.py5
-rw-r--r--pyload/web/webinterface.py4
2 files changed, 5 insertions, 4 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 = ""
diff --git a/pyload/web/webinterface.py b/pyload/web/webinterface.py
index 37d06bd68..cf73827b7 100644
--- a/pyload/web/webinterface.py
+++ b/pyload/web/webinterface.py
@@ -24,10 +24,6 @@ from os.path import join, abspath, dirname
PROJECT_DIR = abspath(dirname(__file__))
PYLOAD_DIR = abspath(join(PROJECT_DIR, "..", ".."))
-sys.path.append(PYLOAD_DIR)
-
-from pyload import InitHomeDir
-
import bottle
from bottle import run, app