Maildir: Call top-level directory '', not '.'
If nametrans translates to an empty directory we want to find the top-level directory by name '' and not by name '.'. This unbreaks nametrans rules that result in empty folder names. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
		| @@ -146,7 +146,7 @@ class MaildirRepository(BaseRepository): | ||||
|         self.debug("  toppath = %s" % toppath) | ||||
|  | ||||
|         # Iterate over directories in top & top itself. | ||||
|         for dirname in os.listdir(toppath) + ['.']: | ||||
|         for dirname in os.listdir(toppath) + ['']: | ||||
|             self.debug("  *** top of loop") | ||||
|             self.debug("  dirname = %s" % dirname) | ||||
|             if dirname in ['cur', 'new', 'tmp']: | ||||
| @@ -173,7 +173,7 @@ class MaildirRepository(BaseRepository): | ||||
|                                                            foldername, | ||||
|                                                            self.getsep(), | ||||
|                                                            self)) | ||||
|             if self.getsep() == '/' and dirname != '.': | ||||
|             if self.getsep() == '/' and dirname != '': | ||||
|                 # Recursively check sub-directories for folders too. | ||||
|                 retval.extend(self._getfolders_scandir(root, foldername)) | ||||
|         self.debug("_GETFOLDERS_SCANDIR RETURNING %s" % \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sebastian Spaeth
					Sebastian Spaeth