From 0745437cd1d3109463405f2083454a0782ff2ff4 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sun, 25 Aug 2013 19:14:15 -0300 Subject: Only remove leading slash from IMAP mailboxes Otherwise this breaks maildir support --- lib/feed2imap/config.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/feed2imap/config.rb b/lib/feed2imap/config.rb index fd4e94f..f478296 100644 --- a/lib/feed2imap/config.rb +++ b/lib/feed2imap/config.rb @@ -71,10 +71,11 @@ class F2IConfig if f['disable'].nil? uri = URI::parse(f['target'].to_s) path = URI::unescape(uri.path) - path = path[1..-1] if path[0,1] == '/' if uri.scheme == 'maildir' @feeds.push(ConfigFeed::new(f, maildir_account, path, self)) else + # remove leading slash from IMAP mailbox names + path = path[1..-1] if path[0,1] == '/' @feeds.push(ConfigFeed::new(f, @imap_accounts.add_account(uri), path, self)) end end -- cgit v1.2.3