diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 2905889a..ac82f8a6 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -1098,8 +1098,8 @@ public abstract class ExchangeSession { public List getSubFolders(String folderName, boolean recursive) throws IOException { List results = getSubFolders(folderName, or(isEqualTo("folderclass", "IPF.Note"), isNull("folderclass")), recursive); - // need to include base folder in recursive search - if (recursive) { + // need to include base folder in recursive search, except on root + if (recursive && folderName.length() > 0) { results.add(getFolder(folderName)); }