diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-04-30 19:16:47 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-04-30 19:16:47 +0200 |
commit | 6272b848234d63ce193abc6996b2eec9b2af5cb7 (patch) | |
tree | 1f5f963c07fb4d5c3d4a454c40afd4b3025c8b78 /module/network/HTTPDownload.py | |
parent | UploadStation & BitshareCom: #295 (diff) | |
download | pyload-6272b848234d63ce193abc6996b2eec9b2af5cb7.tar.xz |
Diffstat (limited to 'module/network/HTTPDownload.py')
-rw-r--r-- | module/network/HTTPDownload.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py index b20f565ea..9d0395c6f 100644 --- a/module/network/HTTPDownload.py +++ b/module/network/HTTPDownload.py @@ -18,7 +18,7 @@ """ from os import remove, fsync -from os.path import dirname, join +from os.path import dirname from time import sleep, time from shutil import move @@ -28,11 +28,12 @@ from HTTPChunk import ChunkInfo, HTTPChunk from HTTPRequest import BadHeader from module.plugins.Plugin import Abort +from module.utils import save_join class HTTPDownload(): """ loads a url http + ftp """ def __init__(self, url, filename, get={}, post={}, referer=None, cj=None, bucket=None, - interface=None, proxies={}, progressNotify=None, disposition=True): + interface=None, proxies={}, progressNotify=None, disposition=False): self.url = url self.filename = filename #complete file destination, not only name self.get = get @@ -110,7 +111,7 @@ class HTTPDownload(): fo.close() if self.nameDisposition and self.disposition: - self.filename = join(dirname(self.filename), self.nameDisposition) + self.filename = save_join(dirname(self.filename), self.nameDisposition) move(init, self.filename) self.info.remove() #remove info file |