aboutsummaryrefslogtreecommitdiffstats
path: root/src/messaging/maildirFolder.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2004-12-21 09:04:19 +0000
committerVincent Richard <[email protected]>2004-12-21 09:04:19 +0000
commit706c270073daeb2b303ab34b7c5c9862da62b1ae (patch)
treecc081dd5ac849d27ea825b6ddc958c76818ab24a /src/messaging/maildirFolder.cpp
parentAdded component::getChildComponents() function. (diff)
downloadvmime-706c270073daeb2b303ab34b7c5c9862da62b1ae.tar.gz
vmime-706c270073daeb2b303ab34b7c5c9862da62b1ae.zip
Fixed ',2' in filename/flags + fixed file renaming when moving from 'new' to 'cur' + new functions random::getString() and maildirUtils::generateId().
Diffstat (limited to 'src/messaging/maildirFolder.cpp')
-rw-r--r--src/messaging/maildirFolder.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/messaging/maildirFolder.cpp b/src/messaging/maildirFolder.cpp
index 54d35989..21b97016 100644
--- a/src/messaging/maildirFolder.cpp
+++ b/src/messaging/maildirFolder.cpp
@@ -343,13 +343,16 @@ void maildirFolder::scanFolder()
for (std::vector <utility::file::path::component>::const_iterator
it = newMessageFilenames.begin() ; it != newMessageFilenames.end() ; ++it)
{
+ const utility::file::path::component newFilename =
+ maildirUtils::buildFilename(maildirUtils::extractId(*it), 0);
+
// Move messages from 'new' to 'cur'
utility::auto_ptr <utility::file> file = fsf->create(newDirPath / *it);
- file->rename(curDirPath / *it);
+ file->rename(curDirPath / newFilename);
// Append to message list
messageInfos msgInfos;
- msgInfos.path = *it;
+ msgInfos.path = newFilename;
msgInfos.type = messageInfos::TYPE_CUR;
m_messageInfos.push_back(msgInfos);