/head: changeset 84

Fixed read-only folders and UW flag case-sensitivity. Readied 2.0.4.
This commit is contained in:
jgoerzen 2002-07-06 01:22:23 +01:00
parent f56e3dbdf2
commit 98981a6cf0
6 changed files with 46 additions and 9 deletions

View File

@ -1,3 +1,23 @@
2002-07-05 09:22 jgoerzen
* TODO, debian/changelog, offlineimap/imaputil.py,
offlineimap/folder/IMAP.py, offlineimap/repository/IMAP.py: Fixed
read-only folders and UW flag case-sensitivity. Readied 2.0.4.
2002-07-04 21:32 jgoerzen
* offlineimap/version.py: Updated for 2.0.3
2002-07-04 20:46 jgoerzen
* offlineimap.conf, offlineimap.py, debian/changelog,
offlineimap/imapserver.py, offlineimap/repository/IMAP.py: Modified
to allow specifying a reference
2002-07-04 15:36 jgoerzen
* ChangeLog: Built for 2.0.2
2002-07-04 15:36 jgoerzen
* debian/changelog: Updated with tunnel feature

View File

@ -1,2 +1,4 @@
* Add an option to handle the network exception that results if a connection
to the IMAP server fails, or there is another socket error.
* Force unidirectional sync for read-only folders.

View File

@ -1,3 +1,11 @@
offlineimap (2.0.4) unstable; urgency=low
* Made OfflineIMAP at least rudimentarily compatible with read-only
folders. It will still fail if they get modified locally, though.
* Flags are handled case-insensitively. Closes: #151993.
-- John Goerzen <jgoerzen@complete.org> Fri, 5 Jul 2002 09:10:29 -0500
offlineimap (2.0.3) unstable; urgency=low
* Added support for specifying references. Closes: #151960.

View File

@ -55,7 +55,10 @@ class IMAPFolder(BaseFolder):
def cachemessagelist(self):
imapobj = self.imapserver.acquireconnection()
try:
imapobj.select(self.getfullname())
try:
imapobj.select(self.getfullname()) # Needed for fetch below
except imapobj.readonly:
pass
self.messagelist = {}
response = imapobj.status(self.getfullname(), '(MESSAGES)')[1][0]
result = imaputil.imapsplit(response)[1]
@ -81,8 +84,11 @@ class IMAPFolder(BaseFolder):
def getmessage(self, uid):
imapobj = self.imapserver.acquireconnection()
try:
try:
imapobj.select(self.getfullname())
except imapobj.readonly:
pass
return imapobj.uid('fetch', '%d' % uid, '(BODY.PEEK[])')[1][0][1].replace("\r\n", "\n")
finally:
self.imapserver.releaseconnection(imapobj)

View File

@ -76,13 +76,13 @@ def imapsplit(string):
return retval
def flagsimap2maildir(string):
flagmap = {'\\Seen': 'S',
'\\Answered': 'R',
'\\Flagged': 'F',
'\\Deleted': 'T',
'\\Draft': 'D'}
flagmap = {'\\seen': 'S',
'\\answered': 'R',
'\\flagged': 'F',
'\\deleted': 'T',
'\\draft': 'D'}
retval = []
imapflaglist = flagsplit(string)
imapflaglist = [x.lower() for x in flagsplit(string)]
for imapflag in imapflaglist:
if flagmap.has_key(imapflag):
retval.append(flagmap[imapflag])

View File

@ -55,7 +55,8 @@ class IMAPRepository(BaseRepository):
self.imapserver.releaseconnection(imapobj)
for string in listresult:
flags, delim, name = imaputil.imapsplit(string)
if '\\Noselect' in imaputil.flagsplit(flags):
flaglist = [x.lower() for x in imaputil.flagsplit(flags)]
if '\\noselect' in flaglist:
continue
foldername = imaputil.dequote(name)
if not self.folderfilter(foldername):