136636 r=sspitzer sr=bienvenu a=rjesup. StartBatch is called twice in some cases, so don't set m_ownFolderStream to false. fixes regressions - moving msgs/ filter corrupting Inbox.

This commit is contained in:
naving%netscape.com 2002-04-10 21:12:29 +00:00
Родитель 54e1af8c4d
Коммит 69fbf8cc53
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -240,13 +240,11 @@ nsresult nsMailDatabase::OnNewPath (nsFileSpec &newPath)
NS_IMETHODIMP nsMailDatabase::StartBatch() NS_IMETHODIMP nsMailDatabase::StartBatch()
{ {
#ifndef XP_MAC #ifndef XP_MAC
if (!m_folderStream) if (!m_folderStream) //only if we create a stream, set m_ownFolderStream to true.
{ {
m_folderStream = new nsIOFileStream(nsFileSpec(*m_folderSpec)); m_folderStream = new nsIOFileStream(nsFileSpec(*m_folderSpec));
m_ownFolderStream = PR_TRUE; m_ownFolderStream = PR_TRUE;
} }
else
m_ownFolderStream = PR_FALSE; //better to set it, if EndBatch was not called last time
#endif #endif
return NS_OK; return NS_OK;
} }