/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)")
# Not a directory -- not a folder.
continue
if not (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, 'tmp'))):
# Doesn't have maildir stuff -- not a folder.
self.debug(" skipping this entry (doesn't have cur, new, tmp)")
continue
foldername = dirname
if extension != None:
foldername = os.path.join(extension, dirname)
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, 'tmp'))):
# This directory has maildir stuff -- process
self.debug(" This is a maildir folder.")
foldername = 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,
self.getsep()))
retval.append(folder.Maildir.MaildirFolder(self.root, foldername,
self.getsep()))
if self.getsep() == '/':
# Check sub-directories for folders.
retval.extend(self._getfolders_scandir(root, foldername))