[PATCH] Avoid trying to synchronize folders that have empty names
Sebastian Spaeth
Sebastian at SSpaeth.de
Fri Aug 31 20:27:58 BST 2012
Dodji Seketeli <dodji at seketeli.org> writes:
> And now the patch.
Hi, and thanks for the patch. I had only a brief chance to look at it,
but I believe it does not work properly. See below.
> - if dirname == '' and extension is not None:
> - self.debug(' skip this entry (already scanned)')
> + if dirname == '':
> + if extension is not None:
> + # We are skipping this because it has already be
> + # scanned
> + self.debug(' skip this entry (already scanned)')
> + else:
> + # We are skipping this because a directory with an
> + # empty path name does not make sense
> + self.debug(' skip this entry (None)')
So what if our local maildir looks like this:
~
~/mail
~/mail/cur
~/mail/new
~/mail/tmp
~/mail/Sent
~/mail/Sent/new
~/mail/Sent/cur
~/mail/Sent/tmp
With your patch we would never scan the top-level directory, missing out
the main cur/new/tmp folders there. Am I right with that assumption?
Handling top-level folders is tricky. Which is, why I made a mistake
too...
Sebastian
More information about the OfflineIMAP-project
mailing list