DAMNIT DAMNIT DAMNIT.

This one caused fb to crash on me while I was attempting to save my Dell system purchase receipt -_-.
Fix crash in download manager when saving images, links or pages.


git-svn-id: svn://10.0.0.236/trunk@150342 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ben%bengoodger.com 2003-12-16 00:03:12 +00:00
parent 8c87d60e22
commit 6e58a17f70

View File

@ -507,13 +507,15 @@ nsDownloadManager::AddDownload(DownloadType aDownloadType,
// because the EHAS isn't smart enough to know that we're fooling with
// it...
nsMIMEInfoHandleAction action = nsIMIMEInfo::saveToDisk;
aMIMEInfo->GetPreferredAction(&action);
if (action == nsIMIMEInfo::useHelperApp ||
action == nsIMIMEInfo::useSystemDefault) {
PRBool fileExists;
aTarget->Exists(&fileExists);
if (fileExists)
aTarget->Remove(PR_TRUE);
if (aMIMEInfo) {
aMIMEInfo->GetPreferredAction(&action);
if (action == nsIMIMEInfo::useHelperApp ||
action == nsIMIMEInfo::useSystemDefault) {
PRBool fileExists;
aTarget->Exists(&fileExists);
if (fileExists)
aTarget->Remove(PR_TRUE);
}
}
nsAutoString path;