diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-17 11:43:48 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-17 11:43:48 +0200 |
commit | 2d6cb8b4eb467d23373c5dd0e59ab90b7901b327 (patch) | |
tree | fea53a19005928b307c0ab38bae14e8417d66f9b /module | |
parent | missing icon (diff) | |
download | pyload-2d6cb8b4eb467d23373c5dd0e59ab90b7901b327.tar.xz |
change config path fix
Diffstat (limited to 'module')
-rw-r--r-- | module/InitHomeDir.py | 16 | ||||
-rw-r--r-- | module/PluginManager.py | 2 | ||||
-rw-r--r-- | module/config/default.conf | 2 |
3 files changed, 9 insertions, 11 deletions
diff --git a/module/InitHomeDir.py b/module/InitHomeDir.py index 0c66b5c32..8515310ef 100644 --- a/module/InitHomeDir.py +++ b/module/InitHomeDir.py @@ -55,26 +55,24 @@ __builtin__.homedir = homedir args = " ".join(argv[1:]) # dirty method to set configdir from commandline arguments - -if path.exists(path.join(pypath, "module", "config", "configdir")): - f = open(path.join(pypath, "module", "config", "configdir"), "rb") - c = f.read().strip() - configdir = path.join(pypath, c) - -elif "--configdir=" in args: +if "--configdir=" in args: pos = args.find("--configdir=") end = args.find("-", pos+12) - + if end == -1: configdir = args[pos+12:].strip() else: configdir = args[pos+12:end].strip() +elif path.exists(path.join(pypath, "module", "config", "configdir")): + f = open(path.join(pypath, "module", "config", "configdir"), "rb") + c = f.read().strip() + configdir = path.join(pypath, c) else: if platform in ("posix","linux2"): configdir = path.join(homedir, ".pyload") else: configdir = path.join(homedir, "pyload") - + if not path.exists(configdir): makedirs(configdir, 0700) diff --git a/module/PluginManager.py b/module/PluginManager.py index fc144e8d5..afd527e40 100644 --- a/module/PluginManager.py +++ b/module/PluginManager.py @@ -132,7 +132,7 @@ class PluginManager(): version = 0 if home and home.has_key(name): - if home[name]["v"] > version: + if home[name]["v"] >= version: continue diff --git a/module/config/default.conf b/module/config/default.conf index eaa27f596..6b089d487 100644 --- a/module/config/default.conf +++ b/module/config/default.conf @@ -33,7 +33,7 @@ general - "General": ip download_interface : "Outgoing IP address for downloads" = None
permission - "Permissions":
bool change_user : "Change user of running process" = False
- str user : "Username" = "user"
+ str user : "Username" = user
str folder : "Folder Permission mode" = 0755
bool change_file : "Change file mode of downloads" = False
str file : "Filemode for Downloads" = 0644
|