Bug 919076 - Minimum set of changes to enable group and world readable files depending on umask. r=paolo

This commit is contained in:
Monica Chew 2013-11-27 11:34:09 -08:00
parent 02019a98b1
commit d7e15c47ae
2 changed files with 3 additions and 3 deletions

View File

@ -561,7 +561,7 @@ BackgroundFileSaver::ProcessStateChange()
nsCOMPtr<nsIOutputStream> outputStream;
rv = NS_NewLocalFileOutputStream(getter_AddRefs(outputStream),
mActualTarget,
PR_WRONLY | creationIoFlags, 0600);
PR_WRONLY | creationIoFlags, 0644);
NS_ENSURE_SUCCESS(rv, rv);
outputStream = NS_BufferOutputStream(outputStream, BUFFERED_IO_SIZE);

View File

@ -1463,7 +1463,7 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel)
rv = mTempFile->Append(NS_ConvertUTF8toUTF16(tempLeafName));
// make this file unique!!!
NS_ENSURE_SUCCESS(rv, rv);
rv = mTempFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
rv = mTempFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0644);
NS_ENSURE_SUCCESS(rv, rv);
// Now save the temp leaf name, minus the ".part" bit, so we can use it later.
@ -2289,7 +2289,7 @@ NS_IMETHODIMP nsExternalAppHandler::LaunchWithApplication(nsIFile * aApplication
fileToUse->Append(mSuggestedFileName);
#endif
nsresult rv = fileToUse->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
nsresult rv = fileToUse->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0644);
if(NS_SUCCEEDED(rv))
{
mFinalFileDestination = do_QueryInterface(fileToUse);