From ed43f16ba56a014de57aad010c42fd3fdde7f870 Mon Sep 17 00:00:00 2001 From: Jeix Date: Sun, 20 Jun 2010 11:59:21 +0200 Subject: New feature: FTP download support use like this: ftp://user:passwd@ftp.server.net/path/to/file user:passwd@ is optional bugfix: linklist.py --- module/network/XdccRequest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/network/XdccRequest.py') diff --git a/module/network/XdccRequest.py b/module/network/XdccRequest.py index c7c4bc893..57fdced66 100644 --- a/module/network/XdccRequest.py +++ b/module/network/XdccRequest.py @@ -192,7 +192,7 @@ class XdccRequest: if len(m.groups()) > 3: self.dl_size = int(m.group(4)) dcc_packname = self.get_free_name(path + '\\' + dcc_packname) - dcc_fpointer = open(dcc_packname, "wb") + dcc_fpointer = open(dcc_packname + ".part", "wb") dcc_total = 0 # recv loop for dcc socket @@ -225,8 +225,8 @@ class XdccRequest: # acknowledge data by sending number of recceived bytes dcc.send(struct.pack('!I', dcc_total)) ######################## - free_name = self.get_free_name(file_name) - rename(file_temp, free_name) + free_name = self.get_free_name(dcc_packname) + rename(dcc_packname + ".part", free_name) self.dl = False self.dl_finished = time.time() -- cgit v1.2.3