diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 6f0f09a73a1..9c939cdc7fb 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -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)) {