diff options
author | Vincent Richard <[email protected]> | 2005-05-19 18:37:20 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-05-19 18:37:20 +0000 |
commit | 671d0b660d69d74dbad2a964ff78526e21ba26c5 (patch) | |
tree | 0edf811b2045eb10d0012705f28d7ec1b3f7b9ae | |
parent | Fixed missing 'const'. (diff) | |
download | vmime-671d0b660d69d74dbad2a964ff78526e21ba26c5.tar.gz vmime-671d0b660d69d74dbad2a964ff78526e21ba26c5.zip |
Fixed bug in subfolders enumeration.
-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); |