mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
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:
parent
565d93720f
commit
fc15ea4ee1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user