Bug 410794: temporary downloads no longer cleaned up at shutdown since they are read-only. r+sr=cbiesinger, a=mtschrep

This commit is contained in:
mkmelin+mozilla@iki.fi 2008-01-07 09:11:09 -08:00
parent 55d0d3d42e
commit bdbf8bdca7

View File

@ -872,8 +872,11 @@ nsresult nsExternalHelperAppService::ExpungeTemporaryFiles()
for (PRInt32 index = 0; index < numEntries; index++)
{
localFile = mTemporaryFilesList[index];
if (localFile)
if (localFile) {
// First make the file writable, since the temp file is probably readonly.
localFile->SetPermissions(0600);
localFile->Remove(PR_FALSE);
}
}
mTemporaryFilesList.Clear();