From 76121a284f0dc04f34e1d4204a651295d00bf40d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Tue, 17 Dec 2019 11:24:15 +0100 Subject: [PATCH] Only avoid remote folders, which contains localrepos separator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- offlineimap/accounts.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py index e59c13a..f89f3da 100644 --- a/offlineimap/accounts.py +++ b/offlineimap/accounts.py @@ -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()))