summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Terceiro <terceiro@softwarelivre.org>2013-08-25 19:14:15 -0300
committerAntonio Terceiro <terceiro@softwarelivre.org>2013-08-25 19:14:15 -0300
commit0745437cd1d3109463405f2083454a0782ff2ff4 (patch)
treeb6356dcd518308074e5bdb5d9bdd839dbd7db38f
parentfe8a2a976da302d07e0c07f9cdb275a0800bf5dc (diff)
downloadfeed2imap-0745437cd1d3109463405f2083454a0782ff2ff4.tar.gz
feed2imap-0745437cd1d3109463405f2083454a0782ff2ff4.tar.bz2
feed2imap-0745437cd1d3109463405f2083454a0782ff2ff4.zip
Only remove leading slash from IMAP mailboxes
Otherwise this breaks maildir support
Diffstat (limited to '')
-rw-r--r--lib/feed2imap/config.rb3
1 files changed, 2 insertions, 1 deletions
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