downloads: Rewind file objects correctly on redirects.

This commit is contained in:
Florian Bruhin 2014-11-24 21:04:48 +01:00
parent 9333e92891
commit f7fbf98667

View File

@ -402,6 +402,8 @@ class DownloadItem(QObject):
reply = self._reply
reply.finished.disconnect(self.on_reply_finished)
self._reply = None
if self.fileobj is not None:
self.fileobj.seek(0)
self.redirected.emit(request, reply) # this will change self._reply!
reply.deleteLater() # the old one
return True