/offlineimap/head: changeset 223

First stab at fixing nested mailbox bug
This commit is contained in:
jgoerzen 2002-08-09 02:53:05 +01:00
parent 47b2af5c0d
commit 6c1d5a0d27

View File

@ -119,21 +119,19 @@ class MaildirRepository(BaseRepository):
self.debug(" skipping this entry (not a directory)") self.debug(" skipping this entry (not a directory)")
# Not a directory -- not a folder. # Not a directory -- not a folder.
continue continue
if not (os.path.isdir(os.path.join(fullname, 'cur')) and if (os.path.isdir(os.path.join(fullname, 'cur')) and
os.path.isdir(os.path.join(fullname, 'new')) and os.path.isdir(os.path.join(fullname, 'new')) and
os.path.isdir(os.path.join(fullname, 'tmp'))): os.path.isdir(os.path.join(fullname, 'tmp'))):
# Doesn't have maildir stuff -- not a folder. # This directory has maildir stuff -- process
self.debug(" skipping this entry (doesn't have cur, new, tmp)") self.debug(" This is a maildir folder.")
continue foldername = dirname
if extension != None:
foldername = dirname foldername = os.path.join(extension, dirname)
if extension != None:
foldername = os.path.join(extension, dirname)
self.debug(" foldername = %s" % foldername) self.debug(" foldername = %s" % foldername)
retval.append(folder.Maildir.MaildirFolder(self.root, foldername, retval.append(folder.Maildir.MaildirFolder(self.root, foldername,
self.getsep())) self.getsep()))
if self.getsep() == '/': if self.getsep() == '/':
# Check sub-directories for folders. # Check sub-directories for folders.
retval.extend(self._getfolders_scandir(root, foldername)) retval.extend(self._getfolders_scandir(root, foldername))