diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index d4cc67ee6..b9e9007c0 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -280,9 +280,9 @@ public class ImapStore extends Store { String userInfo = authType.toString() + ":" + userEnc + ":" + passwordEnc; try { Map extra = server.getExtra(); - String prefix = (extra != null) ? extra.get(ImapStoreSettings.PATH_PREFIX_KEY) : null; + String path = (extra != null) ? "/" + extra.get(ImapStoreSettings.PATH_PREFIX_KEY) : null; return new URI(scheme, userInfo, server.host, server.port, - prefix, + path, null, null).toString(); } catch (URISyntaxException e) { throw new IllegalArgumentException("Can't create ImapStore URI", e); diff --git a/src/com/fsck/k9/mail/store/WebDavStore.java b/src/com/fsck/k9/mail/store/WebDavStore.java index 17f3cc98b..6b9e2080f 100644 --- a/src/com/fsck/k9/mail/store/WebDavStore.java +++ b/src/com/fsck/k9/mail/store/WebDavStore.java @@ -242,9 +242,9 @@ public class WebDavStore extends Store { authPath = (authPath != null) ? authPath : ""; String mailboxPath = extra.get(WebDavStoreSettings.MAILBOX_PATH_KEY); mailboxPath = (mailboxPath != null) ? mailboxPath : ""; - uriPath = path + "|" + authPath + "|" + mailboxPath; + uriPath = "/" + path + "|" + authPath + "|" + mailboxPath; } else { - uriPath = "||"; + uriPath = "/||"; } try {