properly ignore folders with invalid characters (sep) in their name
Commit 6b28071b0f
makes the check once nametrans is applied. This is wrong
because separators are valid characters in names returned by nametrans. E.g:
"Sent" -> "[Gmail]/Sent"
Make the check against the raw name of the folder, instead.
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/353
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
ce1de85157
commit
7fe90b8e0d
@ -355,10 +355,10 @@ class SyncableAccount(Account):
|
|||||||
sep = localrepos.getsep()
|
sep = localrepos.getsep()
|
||||||
if (sep != os.path.sep and
|
if (sep != os.path.sep and
|
||||||
sep != remoterepos.getsep() and
|
sep != remoterepos.getsep() and
|
||||||
sep in remotefolder.getvisiblename()):
|
sep in remotefolder.getname()):
|
||||||
self.ui.warn('', "Ignoring folder %s due to unsupported "
|
self.ui.warn('', "Ignoring folder '%s' due to unsupported "
|
||||||
"'%s' character serving as local separator."%
|
"'%s' character serving as local separator."%
|
||||||
(remotefolder.getvisiblename(), localrepos.getsep()))
|
(remotefolder.getname(), localrepos.getsep()))
|
||||||
continue # Ignore unsupported folder name.
|
continue # Ignore unsupported folder name.
|
||||||
|
|
||||||
localfolder = self.get_local_folder(remotefolder)
|
localfolder = self.get_local_folder(remotefolder)
|
||||||
|
Loading…
Reference in New Issue
Block a user