Bug 395308 - Temporary filenames used during download should gain an extra extension. r=biesi, sr=biesi, a=dsicore

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-09-16 07:40:16 -07:00
parent 322e7afda6
commit 3449ca4c0d

View File

@ -1157,6 +1157,10 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel)
AppendUTF8toUTF16(ext, saltedTempLeafName);
}
// Add an additional .part to prevent the OS from running this file in the
// default application.
saltedTempLeafName.Append(NS_LITERAL_STRING(".part"));
mTempFile->Append(saltedTempLeafName); // make this file unique!!!
mTempFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);