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

Caldav: check Depth before search

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1731 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-07-08 21:18:52 +00:00
parent d5e669f7de
commit a5d856f819

View File

@ -608,12 +608,14 @@ public class CaldavConnection extends AbstractConnection {
List<ExchangeSession.Contact> contacts = null;
List<ExchangeSession.Event> events = null;
List<ExchangeSession.Folder> folderList = null;
if (folder.isContact()) {
contacts = session.getAllContacts(folderPath);
} else if (folder.isCalendar()) {
events = session.getAllEvents(folderPath);
if (!folderPath.startsWith("/public")) {
folderList = session.getSubCalendarFolders(folderPath, false);
if (request.getDepth() == 1) {
if (folder.isContact()) {
contacts = session.getAllContacts(folderPath);
} else if (folder.isCalendar()) {
events = session.getAllEvents(folderPath);
if (!folderPath.startsWith("/public")) {
folderList = session.getSubCalendarFolders(folderPath, false);
}
}
}