From 03eefaab9597dcd89ae05d5f71b1ff5917ac8fe7 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 10 Jan 2012 17:09:58 +0100 Subject: [PATCH] Create proper ImapStore URI when an empty path prefix is imported Fixes issue 3986 --- src/com/fsck/k9/mail/store/ImapStore.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index c96e4fdc5..11981e5ec 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -280,7 +280,8 @@ public class ImapStore extends Store { String userInfo = authType.toString() + ":" + userEnc + ":" + passwordEnc; try { Map extra = server.getExtra(); - String path = (extra != null) ? "/" + extra.get(ImapStoreSettings.PATH_PREFIX_KEY) : null; + String prefix = (extra != null) ? extra.get(ImapStoreSettings.PATH_PREFIX_KEY) : null; + String path = (prefix != null) ? "/" + prefix : null; return new URI(scheme, userInfo, server.host, server.port, path, null, null).toString();