mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
IMAP: fix absolute (public) path handling
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@720 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
3908884444
commit
4d46d7c078
@ -832,7 +832,12 @@ public class ExchangeSession {
|
||||
folder.folderPath = href.substring(index + mailPath.length());
|
||||
}
|
||||
} else {
|
||||
throw new DavMailException("EXCEPTION_INVALID_FOLDER_URL", folder.folderPath);
|
||||
try {
|
||||
URI folderURI = new URI(href, false);
|
||||
folder.folderPath = folderURI.getPath();
|
||||
} catch (URIException e) {
|
||||
throw new DavMailException("EXCEPTION_INVALID_FOLDER_URL", href);
|
||||
}
|
||||
}
|
||||
}
|
||||
return folder;
|
||||
@ -970,6 +975,8 @@ public class ExchangeSession {
|
||||
folderPath = folderName.replaceFirst("Sent", sentitemsUrl);
|
||||
} else if (folderName.startsWith("calendar")) {
|
||||
folderPath = folderName.replaceFirst("calendar", calendarUrl);
|
||||
} else if (folderName.startsWith("public")) {
|
||||
folderPath = '/' + folderName;
|
||||
// absolute folder path
|
||||
} else if (folderName.startsWith("/")) {
|
||||
folderPath = folderName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user