Tue, 06 Jun 2017 19:52:41 +0200
Fixed an issue causing the downloading of Plug-in archives bigger than 128MB to fail on Windows.
(grafted from 83fe98028532a4d9b223c44752a49f5bb7049e12)
PluginManager/PluginRepositoryDialog.py | file | annotate | diff | comparison | revisions |
--- a/PluginManager/PluginRepositoryDialog.py Sat Jun 03 13:12:02 2017 +0200 +++ b/PluginManager/PluginRepositoryDialog.py Tue Jun 06 19:52:41 2017 +0200 @@ -510,7 +510,13 @@ return self.__downloadIODevice.open(QIODevice.WriteOnly) - self.__downloadIODevice.write(reply.readAll()) + # read data in chunks + chunkSize = 64 * 1024 * 1024 + while True: + data = reply.read(chunkSize) + if data is None or len(data) == 0: + break + self.__downloadIODevice.write(data) self.__downloadIODevice.close() if QFile.exists(self.__downloadFileName): QFile.remove(self.__downloadFileName)