diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 22:33:41 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 22:33:41 +0200 |
commit | 67fb22b2f84aa9d3f8a8a966932f6191db7ead00 (patch) | |
tree | 83e83c506f4e08a94584543f4bd4876d4e11cbc4 /module/network | |
parent | fixed download aborting #2 (diff) | |
download | pyload-67fb22b2f84aa9d3f8a8a966932f6191db7ead00.tar.xz |
clsoed #352
Diffstat (limited to 'module/network')
-rw-r--r-- | module/network/HTTPChunk.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index cf77ccae6..0fee75682 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -16,7 +16,7 @@ @author: RaNaN """ -from os import remove +from os import remove, stat from os.path import exists from time import sleep from re import search @@ -157,6 +157,8 @@ class HTTPChunk(HTTPRequest): if self.resume: self.fp = open(self.p.info.getChunkName(self.id), "ab") self.arrived = self.fp.tell() + if not self.arrived: + self.arrived = stat(self.p.info.getChunkName(self.id)).st_size if self.range: #do nothing if chunk already finished |