mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 00:31:27 +00:00
on Mac OS X, don't ever set creator code and only set type code if the file doesn't have an extension. b=236389 r=smorgan sr=bsmedberg a=mconnor
This commit is contained in:
parent
834477c8d0
commit
4e86e8f021
@ -1165,17 +1165,14 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel)
|
||||
mTempFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Now that the file exists set Mac type and creator
|
||||
if (mMimeInfo)
|
||||
{
|
||||
// Now that the file exists set Mac type if the file has no extension
|
||||
// and we can determine a type.
|
||||
if (ext.IsEmpty() && mMimeInfo) {
|
||||
nsCOMPtr<nsILocalFileMac> macfile = do_QueryInterface(mTempFile);
|
||||
if (macfile)
|
||||
{
|
||||
PRUint32 type, creator;
|
||||
if (macfile) {
|
||||
PRUint32 type;
|
||||
mMimeInfo->GetMacType(&type);
|
||||
mMimeInfo->GetMacCreator(&creator);
|
||||
macfile->SetFileType(type);
|
||||
macfile->SetFileCreator(creator);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user