diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/messaging/imap/IMAPFolder.cpp | 15 |
2 files changed, 17 insertions, 2 deletions
@@ -2,6 +2,10 @@ VERSION 0.7.1cvs ================ +2005-05-19 Vincent Richard <[email protected]> + + * messaging/imap/IMAPFolder.cpp: fixed bug in subfolders enumeration. + 2005-05-15 Vincent Richard <[email protected]> * 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 <folder*> 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); |