Caldav: make shared calendar test case insensitive

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1004 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-04-14 20:08:33 +00:00
parent 2c36e396d8
commit 5afe512501
1 changed files with 2 additions and 2 deletions

View File

@ -2916,7 +2916,7 @@ public class ExchangeSession {
public String buildCalendarPath(String principal, String folderName) throws IOException {
StringBuilder buffer = new StringBuilder();
// other user calendar => replace principal folder name in mailPath
if (principal != null && !alias.equals(principal) && !email.equals(principal)) {
if (principal != null && !alias.equalsIgnoreCase(principal) && !email.equalsIgnoreCase(principal)) {
LOGGER.debug("Detected shared calendar path for principal " + principal + ", user principal is " + email);
int index = mailPath.lastIndexOf('/', mailPath.length() - 2);
if (index >= 0 && mailPath.endsWith("/")) {
@ -2954,7 +2954,7 @@ public class ExchangeSession {
* @return true if folderPath is a public or shared folder
*/
public boolean isSharedFolder(String folderPath) {
return !folderPath.startsWith(mailPath);
return !folderPath.toLowerCase().startsWith(mailPath.toLowerCase());
}
/**