From 67fb22b2f84aa9d3f8a8a966932f6191db7ead00 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 14 Jul 2011 22:33:41 +0200 Subject: clsoed #352 --- module/network/HTTPChunk.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/network/HTTPChunk.py') 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 -- cgit v1.2.3