Closed Bug 2050002 Opened 2 months ago Closed 2 months ago

Download files (extensions are removed) 153.0b3 (64-bit) mac version

Categories

(Core :: Widget: Cocoa, defect)

Firefox 153
defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox152 --- unaffected
firefox153 --- fixed
firefox154 --- fixed

People

(Reporter: guiorsonic, Assigned: spohl)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0

Steps to reproduce:

When the "Ask where to save files before downloading" dialog box option is selected

Actual results:

Firefox removes the file extension from downloaded files (e.g., .exe, .doc, etc.).
This does not happen with files set to open in the browser (e.g. xml,svg,webp,avif,jxl).
or
The dialog box is unchecked (save directly to the set folder).

Expected results:

Firefox should download the file exactly as it is provided on the server (with its extension).

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core

Could you confirm what OS and version that you're seeing this on? Do you change the name of the file at all in the file save dialog?

Severity: -- → S3
Flags: needinfo?(guiorsonic)

I am using macOS Catalina 10.15.8 (19H2036) and do not change the file when saving. However, if I change (add) the file extension (restoring the original one) after the file has already been downloaded, it works. Firefox is simply removing the extension.

Flags: needinfo?(guiorsonic)

Could you run mozregression to see when this started happening? You can either choose to use the GUI tool, or simply run these three commands in a Terminal window:

sudo easy_install pip
sudo python3 -m pip install -U mozregression --ignore-installed
mozregression

A number of Firefox versions will open in succession to narrow down when this started occurring. Simply type "good" or "bad" in Terminal based on whether or not a build reproduces the bug. Once finished, please post the output from the last run. It should give a last good and first bad revision as well as a link to look at the changesets in that range. Thank you!

Flags: needinfo?(guiorsonic)

The fix for bug 514491 removed the code that declared the default filename's extension as the save panel's allowed type, and replaced it with an observer that updates the extension only when the user changes the format popup.

For a download where the user just picks a location and does not touch the format popup, nothing tells NSSavePanel what the file's extension is, so on some configurations the extension is dropped from the saved file. This restores declaring the default filename's extension as the allowed type at setup, and keeps the observer's allowedFileTypes in sync so the format popup still updates the extension as intended by bug 514491.

Assignee: nobody → spohl.mozilla.bugs
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
Regressed by: 514491

Set release status flags based on info from the regressing bug 514491

Duplicate of this bug: 2050825
Pushed by spohl@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f797a2b2c85c https://hg.mozilla.org/integration/autoland/rev/64ac0608cd79 macOS: Keep the file's extension in the save panel when the format popup is not changed. r=mac-reviewers,bradwerth

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: In some configurations on macOS, the file picker may no longer display the default file extension, which may lead to files being saved without their original file extension.
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: This simply restores some long-standing code that was in place before bug 514491 landed.
  • String changes made/needed?: none
  • Is Android affected?: no
Attachment #9606011 - Flags: approval-mozilla-beta?

The fix for bug 514491 removed the code that declared the default filename's extension as the save panel's allowed type, and replaced it with an observer that updates the extension only when the user changes the format popup.

For a download where the user just picks a location and does not touch the format popup, nothing tells NSSavePanel what the file's extension is, so on some configurations the extension is dropped from the saved file. This restores declaring the default filename's extension as the allowed type at setup, and keeps the observer's allowedFileTypes in sync so the format popup still updates the extension as intended by bug 514491.

Original Revision: https://phabricator.services.mozilla.com/D310756

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Attachment #9606011 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: