fix for #29894, newsrc file corruption. need to truncate the newsrc when

we open it.  otherwise, if we go to write it out and it has gotten smaller,
we will leave garbage at the end of the file.  big thanks to Ken Dowling (kdowling@concentric.net) reporting this bug. a=jar
This commit is contained in:
sspitzer%netscape.com 2000-03-02 05:19:18 +00:00
Родитель ff94f583e2
Коммит ef3666f4a3
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -194,7 +194,7 @@ nsNntpIncomingServer::WriteNewsrcFile()
rv = newsrcFile->GetFileSpec(&newsrcFileSpec);
if (NS_FAILED(rv)) return rv;
nsIOFileStream newsrcStream(newsrcFileSpec /*, PR_CREATE_FILE */ );
nsIOFileStream newsrcStream(newsrcFileSpec, (PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE));
nsCOMPtr<nsIEnumerator> subFolders;
nsCOMPtr<nsIFolder> rootFolder;