зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
ff94f583e2
Коммит
ef3666f4a3
|
@ -194,7 +194,7 @@ nsNntpIncomingServer::WriteNewsrcFile()
|
||||||
rv = newsrcFile->GetFileSpec(&newsrcFileSpec);
|
rv = newsrcFile->GetFileSpec(&newsrcFileSpec);
|
||||||
if (NS_FAILED(rv)) return rv;
|
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<nsIEnumerator> subFolders;
|
||||||
nsCOMPtr<nsIFolder> rootFolder;
|
nsCOMPtr<nsIFolder> rootFolder;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче