Fixed creation of store URIs when a "path" was used.

This commit is contained in:
cketti 2011-11-29 21:45:52 +01:00
parent 9350a3b1b6
commit d6fbeb2913
2 changed files with 4 additions and 4 deletions

View File

@ -280,9 +280,9 @@ public class ImapStore extends Store {
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);

View File

@ -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 {