rev 293 - in offlineimap/head: debian offlineimap
[email protected] Thu, 2 Jan 2003 14:05:15 -0600 (CST)
| Newsgroups | gmane.mail.imap.offlineimap.subversion |
|---|---|
| Message-ID | <[email protected]> |
Author: jgoerzen
Date: 2003-01-02 14:05:14 -0600 (Thu, 02 Jan 2003)
New Revision: 293
Modified:
offlineimap/head/debian/changelog
offlineimap/head/offlineimap/imaputil.py
Log:
* Now properly handles folder names that contain parenthesis. Used
patch from Kyler Laird in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=173895.
Closes: #173895.
Modified: offlineimap/head/debian/changelog
==============================================================================
--- offlineimap/head/debian/changelog (original)
+++ offlineimap/head/debian/changelog Thu Jan 2 14:05:15 2003
@@ -1,6 +1,10 @@
offlineimap (3.99.6) unstable; urgency=low
* Beginnings of work to make it work with a threaded Tcl/Tk Tkinter.
+ * Now properly handles folder names that contain parenthesis. Used
+ patch from Kyler Laird in
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=173895.
+ Closes: #173895.
-- John Goerzen <[email protected]> Thu, 2 Jan 2003 13:59:44 -0600
Modified: offlineimap/head/offlineimap/imaputil.py
==============================================================================
--- offlineimap/head/offlineimap/imaputil.py (original)
+++ offlineimap/head/offlineimap/imaputil.py Thu Jan 2 14:05:15 2003
@@ -112,8 +112,14 @@
retval = []
while len(workstr):
if workstr[0] == '(':
- # Needs rindex to properly process eg (FLAGS () UID 123)
- rpareni = workstr.rindex(')') + 1
+ rparenc = 1 # count of right parenthesis to match
+ rpareni = 1 # position to examine
+ while rparenc: # Find the end of the group.
+ if workstr[rpareni] == ')': # end of a group
+ rparenc -= 1
+ elif workstr[rpareni] == '(': # start of a group
+ rparenc += 1
+ rpareni += 1 # Move to next character.
parenlist = workstr[0:rpareni]
workstr = workstr[rpareni:].lstrip()
retval.append(parenlist)