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
464342e1dd
commit
3bc68ecd65
@ -162,7 +162,7 @@ class MaildirRepository(BaseRepository):
|
|||||||
# Not a directory -- not a folder.
|
# Not a directory -- not a folder.
|
||||||
continue
|
continue
|
||||||
foldername = dirname
|
foldername = dirname
|
||||||
if extension != None:
|
if extension and dirname != '':
|
||||||
foldername = os.path.join(extension, dirname)
|
foldername = os.path.join(extension, dirname)
|
||||||
if (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
|
||||||
|
Loading…
Reference in New Issue
Block a user