[Bug 280419] When a temporary file is created from the download manager

it should be readonly. Also applies to attachments in mail.
r=cbiesinger, sr=dmose, a=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@233952 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkmelin+mozilla%iki.fi
2007-09-05 16:10:09 +00:00
parent 1389be0917
commit 2e271e3821

View File

@@ -1976,6 +1976,9 @@ nsresult nsExternalAppHandler::OpenWithApplication()
// if a stop request was already issued then proceed with launching the application.
if (mStopRequestIssued)
{
// make the tmp file readonly so users won't edit it and lose the changes
mFinalFileDestination->SetPermissions(0400);
rv = mMimeInfo->LaunchWithFile(mFinalFileDestination);
if (NS_FAILED(rv))
{