summaryrefslogtreecommitdiffstats
path: root/module/network/XdccRequest.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-06-20 11:59:21 +0200
committerGravatar Jeix <devnull@localhost> 2010-06-20 11:59:21 +0200
commited43f16ba56a014de57aad010c42fd3fdde7f870 (patch)
tree3011153a258d64a6b213d446d149350ca5f46caa /module/network/XdccRequest.py
parentNew feature: XDCC Support (diff)
downloadpyload-ed43f16ba56a014de57aad010c42fd3fdde7f870.tar.xz
New feature: FTP download support
use like this: ftp://user:passwd@ftp.server.net/path/to/file user:passwd@ is optional bugfix: linklist.py
Diffstat (limited to 'module/network/XdccRequest.py')
-rw-r--r--module/network/XdccRequest.py6
1 files changed, 3 insertions, 3 deletions
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()