IMAP: fix double slash in folder path

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1865 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-12-07 23:01:55 +00:00
parent bdb1546e6a
commit b04fe91c65
1 changed files with 5 additions and 1 deletions

View File

@ -917,7 +917,11 @@ public class EwsExchangeSession extends ExchangeSession {
for (EWSMethod.Item item : findFolderMethod.getResponseItems()) {
Folder folder = buildFolder(item);
if (parentFolderPath.length() > 0) {
folder.folderPath = parentFolderPath + '/' + item.get(Field.get("folderDisplayName").getResponseName());
if (parentFolderPath.endsWith("/")) {
folder.folderPath = parentFolderPath + item.get(Field.get("folderDisplayName").getResponseName());
} else {
folder.folderPath = parentFolderPath + '/' + item.get(Field.get("folderDisplayName").getResponseName());
}
} else if (folderIdMap.get(folder.folderId.value) != null) {
folder.folderPath = folderIdMap.get(folder.folderId.value);
} else {