Open Bug 498949 Opened 15 years ago Updated 2 years ago

nsExternalAppHandler::OnStartRequest should (provide a way to) honor browser.download.useDownloadDir pref (autodownload)

Categories

(Firefox :: File Handling, defect)

defect

Tracking

()

People

(Reporter: InvisibleSmiley, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 299372 fixed getting the correct filename when invoking Save Link As in Firefox. That fix was ported to SeaMonkey in bug 426742 (with the same implementation logic and Toolkit dependencies). The problem with the new logic is that the preference to directly save to the default download directory (browser.download.useDownloadDir) is no longer honored. Instead the file picker is always shown now independent from the pref value. Quoting from bug 498152 comment 3: {{ Before the checkin of bug 426742 [SM; FF: bug 299372] saveLink() was always calling saveURL() which calls internalSave() which calls getTargetFile() (all in contentAreaUtils.js). The latter checks the browser.download.useDownloadDir pref and skips the file picker if that is set to TRUE. The problem with the new approach is that nsExternalAppHandler::SaveToDisk() only skips prompting for a filename if its first parameter is set. Here it is invoked by nsExternalAppHandler::OnStartRequest() which unconditionally passes nsnull which equals "always prompt". }}
Component: Download Manager → File Handling
Product: Toolkit → Core
QA Contact: download.manager → file-handling
Version: unspecified → Trunk
Blocks: 498152
Product: Core → Firefox
Version: Trunk → unspecified
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.