mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-21 15:08:52 -05:00
EWS: improve main calendar folder test
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2326 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
611136e3a0
commit
dba3ff26ef
@ -3304,7 +3304,7 @@ public abstract class ExchangeSession {
|
|||||||
* @param folderPath absolute folder path
|
* @param folderPath absolute folder path
|
||||||
* @return true if folderPath is a public or shared folder
|
* @return true if folderPath is a public or shared folder
|
||||||
*/
|
*/
|
||||||
public abstract boolean isMainCalendar(String folderPath);
|
public abstract boolean isMainCalendar(String folderPath) throws IOException;
|
||||||
|
|
||||||
static final String MAILBOX_BASE = "/cn=";
|
static final String MAILBOX_BASE = "/cn=";
|
||||||
|
|
||||||
|
@ -1715,7 +1715,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
createOrUpdateItemMethod.setTimezoneContext(EwsExchangeSession.this.getVTimezone().getPropertyValue("TZID"));
|
createOrUpdateItemMethod.setTimezoneContext(EwsExchangeSession.this.getVTimezone().getPropertyValue("TZID"));
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
executeMethod(createOrUpdateItemMethod);
|
executeMethod(createOrUpdateItemMethod);
|
||||||
|
|
||||||
itemResult.status = createOrUpdateItemMethod.getStatusCode();
|
itemResult.status = createOrUpdateItemMethod.getStatusCode();
|
||||||
@ -2160,8 +2160,10 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isMainCalendar(String folderPath) {
|
public boolean isMainCalendar(String folderPath) throws IOException {
|
||||||
return "calendar".equalsIgnoreCase(folderPath) || (currentMailboxPath + "/calendar").equalsIgnoreCase(folderPath);
|
FolderId currentFolderId = getFolderId(folderPath);
|
||||||
|
FolderId calendarFolderId = getFolderId("calendar");
|
||||||
|
return calendarFolderId.name.equals(currentFolderId.name) && calendarFolderId.value.equals(currentFolderId.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user