Closed Bug 1747548 Opened 6 months ago Closed 6 months ago

Some file types saved by "Save link as" in Private Browsing window are deleted after closing all PB windows

Categories

(Firefox :: Downloads Panel, defect)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox-esr91 --- unaffected
firefox95 --- disabled
firefox96 --- disabled
firefox97 --- verified
firefox98 --- verified

People

(Reporter: Fanolian+BMO, Unassigned)

References

Details

(Keywords: dataloss, nightly-community, reproducible, Whiteboard: [fixed by bug 1741431])

Attachments

(1 file)

777 bytes, application/json
Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
Build ID: 20211223215735

This bug resembles bug 1738448 but now it's about Save Link As instead of download from pdf.js.

Steps to reproduce

  1. Set browser.download.improvements_to_download_panel to true.
  2. Open a private browsing window, go to https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/
  3. Right click on any .svg link and choose Save Link As.
  4. Select a save location and confirm that the browser finishes downloading the file.
    4b (optional). Right click on the file > Properties.
  5. Close all private browsing windows.

Actual result

When the file is downloaded:

  1. At step 4, it is immediately opened in an external application. (bug 1741431)
  2. At Step 4b, file attribute for the file is set to Read-only. (bug 1742754 comment 5)

After closing all PB windows:

The file is deleted.

Expected result

The file is kept even after closing all browser windows because users specifically choose to save the link.

Notes

  1. It feels like the bug applies only to files types affected by bug 1741431, i.e. those that will immediately open in associated applications after downloading. (I don't know how to apply the patch in bug 1741431 myself and confirm this.)
  2. Unlike bug 1742754, this bug cannot be mitigated by setting browser.helperApps.deleteTempFileOnExit to false. The file is still deleted.

Workaround

Set browser.download.improvements_to_download_panel to false.

Preemptively setting this to block bug 1733587 because this causes a data loss.
Setting Firefox 97 as affected because the download improvement will ride the train in Firefox 97.

Blocks: 1733587
Has Regression Range: --- → no
Has STR: --- → yes
See Also: → 1738448, 1741431, 1742754
Attached file handlers.json

handlers.json from an affected newly created profile.

I'm fairly sure the patch in bug 1741431 will fix this.

Depends on: 1741431
See Also: 1741431

Managed to reproduce this issue on Windows 10 x64, macOS 11.6 and on Ubuntu 20.04 x64.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → Desktop

Today's nightly has the fix from bug 1741431 - can you confirm this is now fixed? :-)

Flags: needinfo?(Fanolian+BMO)

This is fixed in 2022-01-06 20220106090415 build. Thanks a lot.

Status: NEW → RESOLVED
Closed: 6 months ago
Flags: needinfo?(Fanolian+BMO)
Resolution: --- → DUPLICATE
Duplicate of bug: 1741431
Resolution: DUPLICATE → FIXED
Whiteboard: [fixed by bug 1741431]
Whiteboard: [fixed by bug 1741431] → [fixed by bug 1741431]
Flags: qe-verify+

Reproduced the issues on Windows 10x64 Fx 97.0a1(2021-12-24).
Verified as fixed on Windows 10x64, Ubuntu 18.4 and macOS 10.12.6 with Fx 98.0a1 and Fx 97.0b4.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.