Only avoid remote folders, which contains localrepos separator

I remove the weird check on the separator itself to only keep the check
that the remote folder name does not contain the chosen local
separator. It must be the only case where troubles occur, as stated by
the above comment.

Fixes: https://github.com/OfflineIMAP/offlineimap/issues/640

Signed-off-by: Étienne Deparis <etienne@depar.is>
This commit is contained in:
Étienne Deparis 2019-12-17 11:24:15 +01:00
parent 50cfab5ba2
commit 76121a284f
No known key found for this signature in database
GPG Key ID: A714ECAC8C9CEE3D
1 changed files with 1 additions and 3 deletions

View File

@ -395,9 +395,7 @@ class SyncableAccount(Account):
# their names since this would cause troubles while converting
# the name back (from local to remote).
sep = localrepos.getsep()
if (sep == os.path.sep or
sep == remoterepos.getsep() or
sep in remotefolder.getname()):
if sep in remotefolder.getname():
self.ui.warn('', "Ignoring folder '%s' due to unsupported "
"'%s' character serving as local separator."%
(remotefolder.getname(), localrepos.getsep()))