EWS: take paging into account in appendSubFolders
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2311 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
61dbe7129d
commit
15fd928588
|
@ -1131,7 +1131,9 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||
protected void appendSubFolders(List<ExchangeSession.Folder> folders,
|
||||
String parentFolderPath, FolderId parentFolderId,
|
||||
Condition condition, boolean recursive) throws IOException {
|
||||
FindFolderMethod findFolderMethod = new FindFolderMethod(FolderQueryTraversal.SHALLOW,
|
||||
FindFolderMethod findFolderMethod;
|
||||
do {
|
||||
findFolderMethod = new FindFolderMethod(FolderQueryTraversal.SHALLOW,
|
||||
BaseShape.ID_ONLY, parentFolderId, FOLDER_PROPERTIES, (SearchExpression) condition);
|
||||
executeMethod(findFolderMethod);
|
||||
for (EWSMethod.Item item : findFolderMethod.getResponseItems()) {
|
||||
|
@ -1152,6 +1154,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||
appendSubFolders(folders, folder.folderPath, folder.folderId, condition, recursive);
|
||||
}
|
||||
}
|
||||
} while (!(findFolderMethod.includesLastItemInRange));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue