diff --git a/toolkit/components/downloads/src/nsDownloadManager.cpp b/toolkit/components/downloads/src/nsDownloadManager.cpp index fed09888f112..f7ff4c82b7f1 100644 --- a/toolkit/components/downloads/src/nsDownloadManager.cpp +++ b/toolkit/components/downloads/src/nsDownloadManager.cpp @@ -547,26 +547,6 @@ nsDownloadManager::AddDownload(DownloadType aDownloadType, // yet (it's being downloaded) and persistentDescriptor fails on MacOSX for // non-existent files. - // XXXben - This is not really ideal. If the download is to be handled by a - // helper application, then we want to see if there is a duplicate file - // in place in the temp folder and remove it _NOW_ before the External - // Helper App Service gets a chance to make a unique clone. If we don't, - // the EHAS will create a unique version of the name which will muck - // with our RDF datasource. We can't create a unique name here either, - // because the EHAS isn't smart enough to know that we're fooling with - // it... - nsMIMEInfoHandleAction action = nsIMIMEInfo::saveToDisk; - if (aMIMEInfo) { - aMIMEInfo->GetPreferredAction(&action); - if (action == nsIMIMEInfo::useHelperApp || - action == nsIMIMEInfo::useSystemDefault) { - PRBool fileExists; - targetFile->Exists(&fileExists); - if (fileExists) - targetFile->Remove(PR_TRUE); - } - } - nsAutoString path; rv = targetFile->GetPath(path); if (NS_FAILED(rv)) return rv; diff --git a/toolkit/mozapps/downloads/content/downloads.js b/toolkit/mozapps/downloads/content/downloads.js index 7501d52ca197..2dbe8960e38f 100644 --- a/toolkit/mozapps/downloads/content/downloads.js +++ b/toolkit/mozapps/downloads/content/downloads.js @@ -251,7 +251,7 @@ function onDownloadCancel(aEvent) var f = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); f.initWithPath(aEvent.target.id); if (f.exists()) - f.remove(true); + f.remove(false); gDownloadViewController.onCommandUpdate(); }