diff --git a/src/java/davmail/caldav/CaldavConnection.java b/src/java/davmail/caldav/CaldavConnection.java index ca181097..3862e90b 100644 --- a/src/java/davmail/caldav/CaldavConnection.java +++ b/src/java/davmail/caldav/CaldavConnection.java @@ -608,12 +608,14 @@ public class CaldavConnection extends AbstractConnection { List contacts = null; List events = null; List 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); + } } }