Improve previous comment & Changelog

Add a changelog to W. Trevor King's previous commit. Also make wording a
bit more consistent and and remove a now unneeded comparison (dirname is
always set when extension is set).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-01-07 23:26:02 +01:00
parent 061712fe1c
commit 137e11c88e
2 changed files with 10 additions and 5 deletions

View File

@ -24,3 +24,5 @@ Bug Fixes
---------
* Fix possible crash during --info run
* Fix reading in Maildirs, where we would attempt to create empty
directories on REMOTE.

View File

@ -151,20 +151,23 @@ class MaildirRepository(BaseRepository):
for dirname in os.listdir(toppath) + ['']:
self.debug(" dirname = %s" % dirname)
if dirname == '' and extension is not None:
self.debug(' skip this entry (extension set)')
self.debug(' skip this entry (already scanned)')
continue
if dirname in ['cur', 'new', 'tmp']:
self.debug(" skipping this dir (Maildir special)")
self.debug(" skip this entry (Maildir special)")
# Bypass special files.
continue
fullname = os.path.join(toppath, dirname)
if not os.path.isdir(fullname):
self.debug(" skipping this entry (not a directory)")
self.debug(" skip this entry (not a directory)")
# Not a directory -- not a folder.
continue
foldername = dirname
if extension and dirname != '':
if extension:
# extension can be None which fails.
foldername = os.path.join(extension, dirname)
else:
foldername = 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'))):