Skip to content

Commit

Permalink
Fixed creation of store URIs when a "path" was used.
Browse files Browse the repository at this point in the history
  • Loading branch information
cketti committed Nov 30, 2011
1 parent e6d98bc commit 07caf62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/com/fsck/k9/mail/store/ImapStore.java
Expand Up @@ -280,9 +280,9 @@ public static String createUri(ServerSettings server) {
String userInfo = authType.toString() + ":" + userEnc + ":" + passwordEnc;
try {
Map<String, String> 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);
Expand Down
4 changes: 2 additions & 2 deletions src/com/fsck/k9/mail/store/WebDavStore.java
Expand Up @@ -242,9 +242,9 @@ public static String createUri(ServerSettings server) {
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 {
Expand Down

0 comments on commit 07caf62

Please sign in to comment.