From 6272b848234d63ce193abc6996b2eec9b2af5cb7 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 30 Apr 2011 19:16:47 +0200 Subject: closed #290, #291, #292 --- module/network/HTTPDownload.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/network/HTTPDownload.py') 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 -- cgit v1.2.3