diff --git a/ChangeLog b/ChangeLog index 601b6992..df14688d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ VERSION 0.7.1cvs ================ +2005-05-19 Vincent Richard + + * messaging/imap/IMAPFolder.cpp: fixed bug in subfolders enumeration. + 2005-05-15 Vincent Richard * messaging/serviceInfos.{hpp|cpp}: changed getAvailableProperties() to diff --git a/src/messaging/imap/IMAPFolder.cpp b/src/messaging/imap/IMAPFolder.cpp index 91bf0177..35f3509b 100644 --- a/src/messaging/imap/IMAPFolder.cpp +++ b/src/messaging/imap/IMAPFolder.cpp @@ -522,13 +522,24 @@ std::vector IMAPFolder::getFolders(const bool recursive) std::ostringstream oss; oss << "LIST "; - oss << IMAPUtils::quoteString - (IMAPUtils::pathToString(m_connection->hierarchySeparator(), getFullPath())); + + const string pathString = IMAPUtils::pathToString + (m_connection->hierarchySeparator(), getFullPath()); if (recursive) + { + oss << IMAPUtils::quoteString(pathString); oss << " *"; + } else + { + if (pathString.empty()) // don't add sep for root folder + oss << "\"\""; + else + oss << IMAPUtils::quoteString(pathString + m_connection->hierarchySeparator()); + oss << " %"; + } m_connection->send(true, oss.str(), true);