summaryrefslogtreecommitdiffstats
path: root/module/Plugin.py
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2010-04-14 21:13:43 +0200
committerGravatar spoob <spoob@gmx.de> 2010-04-14 21:13:43 +0200
commit81365902d6d4d273d39c92522c2b765c2d84b183 (patch)
treee0839bc577788b02b0fffb79bbca25eabff95088 /module/Plugin.py
parentFixed Rapidshare (diff)
downloadpyload-81365902d6d4d273d39c92522c2b765c2d84b183.tar.xz
Makedirs Fix
Diffstat (limited to 'module/Plugin.py')
-rw-r--r--module/Plugin.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/Plugin.py b/module/Plugin.py
index fd230c400..83610866d 100644
--- a/module/Plugin.py
+++ b/module/Plugin.py
@@ -24,6 +24,7 @@ from os.path import join
from time import sleep
import sys
+from os.path import exists
from module.network.Request import Request
from os import makedirs
@@ -175,7 +176,7 @@ class Plugin():
if self.pyfile.package.data["package_name"] != (self.parent.core.config['general']['link_file']):
self.pyfile.folder = self.pyfile.package.data["package_name"]
location = join(download_folder, self.pyfile.folder.decode(sys.getfilesystemencoding()))
- makedirs(location)
+ if not exists(location): makedirs(location)
file_path = join(location.decode(sys.getfilesystemencoding()), self.pyfile.status.filename.decode(sys.getfilesystemencoding()))
else:
file_path = join(download_folder, self.pyfile.status.filename.decode(sys.getfilesystemencoding()))