]> code.delx.au - offlineimap/commitdiff
Added code to limit command line length for very large mailboxes
authorJohn Goerzen <jgoerzen@complete.org>
Tue, 16 Nov 2004 22:41:09 +0000 (23:41 +0100)
committerJohn Goerzen <jgoerzen@complete.org>
Tue, 16 Nov 2004 22:41:09 +0000 (23:41 +0100)
Keywords:

(jgoerzen@complete.org--projects/offlineimap--head--1.0--patch-4)

ChangeLog
offlineimap/folder/IMAP.py

index f283e57e3e192a5c78680330881d9c701eab54c4..948c0b726dd0cb0914c5a6ce77d2f4279ddda96e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen@complete.org--projects/offlineimap--head--1.0
 #
 
+2004-11-16 16:41:09 GMT        John Goerzen <jgoerzen@complete.org>    patch-4
+
+    Summary:
+      Added code to limit command line length for very large mailboxes
+    Revision:
+      offlineimap--head--1.0--patch-4
+
+
+    modified files:
+     ChangeLog offlineimap/folder/IMAP.py
+
+
 2004-10-18 14:01:50 GMT        John Goerzen <jgoerzen@complete.org>    patch-3
 
     Summary:
index e18cb5111c0b28bf3d9ac3b9a7523c3d443933b7..93f83f4a449aa3919357b68bcbdfb9bbd9bc0441 100644 (file)
@@ -282,6 +282,12 @@ class IMAPFolder(BaseFolder):
         self.processmessagesflags('-', uidlist, flags)
 
     def processmessagesflags(self, operation, uidlist, flags):
+        if len(uidlist) > 101:
+            # Hack for those IMAP ervers with a limited line length
+            self.processmessagesflags(operation, uidlist[:100], flags)
+            self.processmessagesflags(operation, uidlist[100:], flags)
+            return
+        
         imapobj = self.imapserver.acquireconnection()
         try:
             try: