From 671d0b660d69d74dbad2a964ff78526e21ba26c5 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 19 May 2005 18:37:20 +0000 Subject: Fixed bug in subfolders enumeration. --- src/messaging/imap/IMAPFolder.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/messaging/imap/IMAPFolder.cpp') 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); -- cgit v1.2.3