diff --git a/Changelog.draft.rst b/Changelog.draft.rst index 0a85888..969655b 100644 --- a/Changelog.draft.rst +++ b/Changelog.draft.rst @@ -16,6 +16,9 @@ New Features Changes ------- +* the -f option did not work with Folder names with spaces. It works + now, use with quoting e.g. -f "INBOX, Deleted Mails". + Bug Fixes --------- diff --git a/offlineimap/init.py b/offlineimap/init.py index 96d4e50..296b84b 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -238,8 +238,10 @@ class OfflineImap: for section in accounts.getaccountlist(config): config.set('Account ' + section, "quick", '-1') + #custom folder list specified? if options.folders: - foldernames = options.folders.replace(" ", "").split(",") + foldernames = map(lambda s: s.strip(), + options.folders.split(",")) folderfilter = "lambda f: f in %s" % foldernames folderincludes = "[]" for accountname in accounts.getaccountlist(config):