aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/maildir/maildirFolder.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2009-12-08 10:03:34 +0000
committerVincent Richard <[email protected]>2009-12-08 10:03:34 +0000
commita3bf37fb4f758469b7b68ad7dcca170913fcd912 (patch)
tree9004b6aca2e4e749212f959011417d52f21c5cb9 /src/net/maildir/maildirFolder.cpp
parentInitialize multi-threading for GNUTLS/GCrypt (thanks to Bartek Szurgot). (diff)
downloadvmime-a3bf37fb4f758469b7b68ad7dcca170913fcd912.tar.gz
vmime-a3bf37fb4f758469b7b68ad7dcca170913fcd912.zip
Fixed not exception-safe constructor, which could lead to possible memory leak (thanks to Bartek Szurgot). Get rid of const-ness on factories.
Diffstat (limited to 'src/net/maildir/maildirFolder.cpp')
-rw-r--r--src/net/maildir/maildirFolder.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/maildir/maildirFolder.cpp b/src/net/maildir/maildirFolder.cpp
index 3e361ae1..dd680c9c 100644
--- a/src/net/maildir/maildirFolder.cpp
+++ b/src/net/maildir/maildirFolder.cpp
@@ -264,7 +264,7 @@ void maildirFolder::scanFolder()
m_messageCount = 0;
m_unreadMessageCount = 0;
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path newDirPath = store->getFormat()->folderPathToFileSystemPath
(m_path, maildirFormat::NEW_DIRECTORY);
@@ -760,7 +760,7 @@ void maildirFolder::setMessageFlagsImpl
{
ref <maildirStore> store = m_store.acquire();
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path curDirPath = store->getFormat()->
folderPathToFileSystemPath(m_path, maildirFormat::CUR_DIRECTORY);
@@ -832,7 +832,7 @@ void maildirFolder::addMessage(utility::inputStream& is, const int size,
else if (m_mode == MODE_READ_ONLY)
throw exceptions::illegal_state("Folder is read-only");
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path tmpDirPath = store->getFormat()->
folderPathToFileSystemPath(m_path,maildirFormat::TMP_DIRECTORY);
@@ -918,7 +918,7 @@ void maildirFolder::copyMessageImpl(const utility::file::path& tmpDirPath,
utility::inputStream& is, const utility::stream::size_type size,
utility::progressListener* progress)
{
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
ref <utility::file> file = fsf->create(tmpDirPath / filename);
@@ -1058,7 +1058,7 @@ void maildirFolder::copyMessagesImpl(const folder::path& dest, const std::vector
{
ref <maildirStore> store = m_store.acquire();
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path curDirPath = store->getFormat()->folderPathToFileSystemPath
(m_path, maildirFormat::CUR_DIRECTORY);
@@ -1200,7 +1200,7 @@ void maildirFolder::expunge()
else if (m_mode == MODE_READ_ONLY)
throw exceptions::illegal_state("Folder is read-only");
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path curDirPath = store->getFormat()->
folderPathToFileSystemPath(m_path, maildirFormat::CUR_DIRECTORY);