Fixed an issue causing the downloading of Plug-in archives bigger than 128MB to fail on Windows.

Tue, 06 Jun 2017 19:52:41 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 06 Jun 2017 19:52:41 +0200
changeset 5755
83fe98028532
parent 5754
978c56f3c25a
child 5757
9a4e28d0b3c4

Fixed an issue causing the downloading of Plug-in archives bigger than 128MB to fail on Windows.

PluginManager/PluginRepositoryDialog.py file | annotate | diff | comparison | revisions
--- a/PluginManager/PluginRepositoryDialog.py	Sat Jun 03 15:39:13 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)

eric ide

mercurial