From 9dc774e01b0978d9cbf70ab7fc28f9902174bc63 Mon Sep 17 00:00:00 2001 From: mguessan Date: Mon, 27 Jun 2011 21:58:13 +0000 Subject: [PATCH] IMAP: need to include base folder in recursive search, except on root git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1720 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ExchangeSession.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); }