1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

Convert absolute IMAP path to relative path and detect ISA server cookie starting with cadata (instead of equals cadata)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@820 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-11-04 23:05:42 +00:00
parent ad0ca0c875
commit ec4187a726

View File

@ -463,7 +463,7 @@ public class ExchangeSession {
protected boolean isAuthenticated() { protected boolean isAuthenticated() {
boolean authenticated = false; boolean authenticated = false;
for (Cookie cookie : httpClient.getState().getCookies()) { for (Cookie cookie : httpClient.getState().getCookies()) {
if ("cadata".equals(cookie.getName()) || "sessionid".equals(cookie.getName())) { if (cookie.getName().startsWith("cadata") || "sessionid".equals(cookie.getName())) {
authenticated = true; authenticated = true;
break; break;
} }
@ -1022,6 +1022,11 @@ public class ExchangeSession {
* @return folder path * @return folder path
*/ */
public String getFolderPath(String folderName) { public String getFolderPath(String folderName) {
// convert absolute IMAP path to relative path
if (folderName.startsWith("/")) {
folderName = folderName.substring(1);
}
String folderPath; String folderPath;
if (folderName.startsWith("INBOX")) { if (folderName.startsWith("INBOX")) {
folderPath = folderName.replaceFirst("INBOX", inboxUrl); folderPath = folderName.replaceFirst("INBOX", inboxUrl);