Don't append trailing slash to maildir foldernames
When sep='/' in a Maildir, we were doing a os.path.join(dirname,'') on the top level maildir, which results in a "dirname/", so all our maildir folder names had slashes appended. Which is pretty much wrong, so this fixes it by only using os.path.join when we actually have something to append. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
c93f8710a3
commit
9a654968fc
@ -160,7 +160,7 @@ class MaildirRepository(BaseRepository):
|
||||
# Not a directory -- not a folder.
|
||||
continue
|
||||
foldername = dirname
|
||||
if extension != None:
|
||||
if extension and dirname != '':
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user