summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-08 16:47:52 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-08 16:47:52 +0100
commit1ecdd9f6b53fec45e1d48592e3ff56aa7a576bec (patch)
tree8d9e42cb670a24b4a9adb439cfc15c4277a61716 /module/Api.py
parentnew MultiHoster hook (diff)
downloadpyload-1ecdd9f6b53fec45e1d48592e3ff56aa7a576bec.tar.xz
some cleanups, closed #490
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/Api.py b/module/Api.py
index 11b06ff32..fba02d574 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -19,7 +19,7 @@
import re
from base64 import standard_b64encode
-from os.path import join
+from os.path import join, isabs
from time import time
from itertools import chain
@@ -300,7 +300,10 @@ class Api(Iface):
else:
folder = ""
- folder = folder.replace("http://", "").replace(":", "").replace("\\", "_") #.replace("/", "_")
+ if isabs(folder):
+ folder = folder.replace("/", "_")
+
+ folder = folder.replace("http://", "").replace(":", "").replace("\\", "_").replace("..", "")
self.core.log.info(_("Added package %(name)s containing %(count)d links") % {"name": name, "count": len(links)})
pid = self.core.files.addPackage(name, folder, dest, password)