Downloaded PDF is set as Read-only with improvements_to_download_panel enabled
Categories
(Firefox :: Downloads Panel, defect)
Tracking
()
People
(Reporter: Fanolian+BMO, Unassigned)
References
(Regression)
Details
(Keywords: nightly-community, regression, reproducible, Whiteboard: [fixed by bug 1726858] )
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0
Build ID: 20211123215113
Steps to reproduce
- Set
browser.download.improvements_to_download_panel
totrue
in a new profile. - In a normal (not private) browsing window, visit https://filesamples.com/samples/document/pdf/sample2.pdf.
- Save the PDF either by using PDF.js download button, or Nightly's
Save Link As
. - Go to Windows Explorer > locate the downloaded PDF > Right click on it > Select
Properties
. - Check the Attributes of the file.
Actual result:
The PDF is set to Read-only.
Expected result:
Read-only is not set.
Workaround:
Disable browser.download.improvements_to_download_panel
.
Additional notes:
Read-only is not set if I save the PDF by using Save Page As
in PDF.js.
Regression
By setting browser.download.improvements_to_download_panel
to always true
:
Last good Nightly: 2021-06-16
First bad Nightly: 2021-06-17
pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=36647ef6f014ee7199a0bad93851750ead132473&tochange=582ea6610e8aa4120ff223167ade012381bf4dae
Bisecting autoland builds:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=79ac5a63d90f0512dfc40a32516c33a252ecc581&tochange=4ebb5912bb0efbe2cccbc56887cdd5b580761461
This is regressed by bug 1710941.
Credits
It is originally reported by sicktothebone on Reddit.
I think this bug is related to bug 1740135.
I tried downloading some other file types listed by default in about:preferences#general (see attachment), namely .avif
, .xml
, .pdf
, .svg
, and .webp
. With Save Link As
all these files are downloaded with the attribute "Read-only" set, and are opened instantly with the external application the files are associated with (rather than just save them).
Sample links for these file types (I do not use filesamples.com here because the files are always downloaded with a left click, which I want to avoid):
AVIF from https://libre-software.net/avif-test/
XML from https://www.w3schools.com/xml/xml_examples.asp
PDF from https://foundation.mozilla.org/en/who-we-are/public-records/
SVG from https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/
WebP from https://developers.google.com/speed/webp/gallery1
As for the image types AVIF
, SVG
and WebP
, if I choose Save Image As
on a displaying image, the downloaded file does not have Read-only set. It is not automatically opened in an external application neither.
Left-clicking the direct link of these file types open them in Nightly without making a local copy, as indicated by the actions set.
(In reply to Fanolian from comment #1)
Left-clicking the direct link of these file types open them in Nightly without making a local copy, as indicated by the actions set.
It should be:
Left-clicking the links of these file types in their respective source pages open them in Nightly without making a local copy, as indicated by the actions set.
Comment 3•4 years ago
|
||
Set release status flags based on info from the regressing bug 1710941
This feature is not enabled by default.
Comment 5•4 years ago
|
||
This might be due to setting Read-only permissions on a file when the download is set to launch: https://searchfox.org/mozilla-central/rev/aa8c75b83f636948f708986173965c84cae8c25f/toolkit/components/downloads/DownloadIntegration.jsm#638-663. We're setting it read-only if we determine the file is temporary, and I believe both launchWhenSucceeded
and browser.helperApps.deleteTempFileOnExit
are true in this case.
Just to double-check, does the issue here go away when you set "browser.helperApps.deleteTempFileOnExit" to false here?
(In reply to [:mtigley] (she/her) from comment #5)
Just to double-check, does the issue here go away when you set "browser.helperApps.deleteTempFileOnExit" to false here?
Yes. All 5 file types are no longer set to read-only. But the files, of course, still open in external applications automatically.
The attached handlers.json
is from the new profile I used for testing, with "browser.helperApps.deleteTempFileOnExit" still set to true
.
Comment 7•4 years ago
|
||
Thanks for checking! The files being set to read-only should be addressed by the work in Bug 1726858. So let's check back here once those patches are landed.
As for the files being automatically opened with an external application, I believe this is being addressed in Bug 1741431.
Comment 8•4 years ago
|
||
Set release status flags based on info from the regressing bug 1710941
Reporter | ||
Comment 10•4 years ago
|
||
Fixed by bug 1726858.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•