summaryrefslogtreecommitdiffstats
path: root/pyload/InitHomeDir.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-05 11:25:08 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-05 11:25:20 +0200
commit7478c104c84e66262dbe1530e877d0ed5525113b (patch)
tree4fd642d975ed09768a75ba0cbb677ae071892665 /pyload/InitHomeDir.py
parentcrypter test link (diff)
downloadpyload-7478c104c84e66262dbe1530e877d0ed5525113b.tar.xz
use different config folder when using dev version
Diffstat (limited to 'pyload/InitHomeDir.py')
-rw-r--r--pyload/InitHomeDir.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pyload/InitHomeDir.py b/pyload/InitHomeDir.py
index d24837d83..91603e104 100644
--- a/pyload/InitHomeDir.py
+++ b/pyload/InitHomeDir.py
@@ -24,6 +24,8 @@ from os.path import join
import sys
from sys import argv, platform
+from . import __version__
+
import __builtin__
__builtin__.owd = path.abspath("") #original working directory
@@ -80,10 +82,10 @@ elif path.exists(path.join(pypath, "pyload", "config", "configdir")):
# default config dir
if not configdir:
- if platform in ("posix", "linux2", "darwin"):
- configdir = path.join(homedir, ".pyload")
- else:
- configdir = path.join(homedir, "pyload")
+ # suffix when running dev version
+ dev = "-dev" if __version__.endswith("-dev") else ""
+ configname = ".pyload" if platform in ("posix", "linux2", "darwin") else "pyload"
+ configdir = path.join(homedir, configname + dev)
if not path.exists(configdir):
makedirs(configdir, 0700)