Fixed bug in subfolders enumeration.

This commit is contained in:
Vincent Richard 2005-05-19 18:37:20 +00:00
parent 598c0a3a58
commit 671d0b660d
2 changed files with 17 additions and 2 deletions

View File

@ -2,6 +2,10 @@
VERSION 0.7.1cvs
================
2005-05-19 Vincent Richard <vincent@vincent-richard.net>
* messaging/imap/IMAPFolder.cpp: fixed bug in subfolders enumeration.
2005-05-15 Vincent Richard <vincent@vincent-richard.net>
* messaging/serviceInfos.{hpp|cpp}: changed getAvailableProperties() to

View File

@ -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);