fix pop3 message quarantining on linux, r=mkmelin, sr=neil, 454622

This commit is contained in:
David Bienvenu 2008-09-23 15:58:16 -07:00
Родитель 8a5e265c60
Коммит 9dbab5c6c2
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -842,7 +842,12 @@ nsPop3Sink::IncorporateComplete(nsIMsgWindow *aMsgWindow, PRInt32 aSize)
PRUint32 msgSize;
hdr->GetMessageSize(&msgSize);
hdr->SetMessageKey(newMsgPos);
m_tmpDownloadFile->GetFileSize(&tmpDownloadFileSize);
// we need to clone because nsLocalFileUnix caches its stat result,
// so it doesn't realize the file has changed size.
nsCOMPtr <nsIFile> tmpClone;
rv = m_tmpDownloadFile->Clone(getter_AddRefs(tmpClone));
NS_ENSURE_SUCCESS(rv, rv);
tmpClone->GetFileSize(&tmpDownloadFileSize);
if (msgSize > tmpDownloadFileSize)
rv = NS_MSG_ERROR_WRITING_MAIL_FOLDER;