Browsing local filesystem, clicking to open a file should do something better than prompting (and not save the chosen action / allow "always" saving/opening)
Categories
(Firefox :: File Handling, defect, P3)
Tracking
()
People
(Reporter: ed, Unassigned)
Details
(Whiteboard: QA-not-reproducible)
Attachments
(1 file, 1 obsolete file)
|
87.70 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Steps to reproduce:
Browse the local filesystem by entering a path in the URI bar. For example on Windows enter C:\ and press Enter. It gets converted to file:///c:/ and the tab shows a listing of that directory.
Now suppose the directory contains a file of type that cannot be displayed directly by Firefox, but is associated with another application -- such as a .csv file. Click on that .csv file in the directory listing.
Actual results:
It "downloads" a copy of the file to your Downloads folder, as if you had downloaded it from a website. This even happens if it was the Downloads folder itself you were browsing!
Expected results:
Since the file is already on local disk, it shouldn't be "downloaded" but just opened directly from its existing location. Firefox should start whichever other application is registered for files of this type and pass it the filename directly.
In other words, file: URIs should be treated a bit differently from other types. They can be turned directly into filenames and passed to other applications. No need to download and save the file first as you would for other URI schemes.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::File Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•4 years ago
•
|
||
(In reply to Ed Avis from comment #0)
Now suppose the directory contains a file of type that cannot be displayed directly by Firefox, but is associated with another application -- such as a .csv file. Click on that .csv file in the directory listing.
Actual results:
It "downloads" a copy of the file to your Downloads folder, as if you had downloaded it from a website. This even happens if it was the Downloads folder itself you were browsing!
Unfortunately I can't reproduce this with either csv files or zip files - if the file type is set to ask you what to do (the default), we ask what to do. If I select "open with [application]" in the dialog when prompted, this opens the file in-place, instead of initiating another download. If it is set to open automatically with an application (you can configure this in the Firefox settings), then (for me) that happens without initiating another download.
The third case here would be if the file type in question is set to always download (in the Firefox settings - you can search for 'csv' in the search box). There we had a bug we recently fixed - bug 1555637 (I know the summary is only about PDF files, but the fix applies to all filetypes - PDF is a bit of a special snowflake because Firefox can handle it internally unless pdf.js is disabled). This will now ask you what to do. You can see the new behaviour in nightly, which you can download from https://nightly.mozilla.org/ . It will be released in regular Firefox in the beginning of July. In the meantime you could also work around locally by changing the setting for "csv" files to "always ask".
So, do you have the file types for which you see this behaviour set to "save to disk" in the preferences?
If not, clearly there is some edgecase we're missing if this isn't what happens for you, but from the details in your report I'm not sure what it is. So I'm going to ask some questions to try to narrow down when this happens. Can you check with a new empty Firefox profile? Does this happen with .zip files as well as .csv files? And how are those file types configured to be handled in Firefox's settings in the profile with which you can reproduce the issue?
Comment 3•4 years ago
|
||
Hey Ed,
I tried reproducing this issue on the latest versions of Firefox Nightly 90.0a1 (2021-05-30), beta 89.0 and release 88.0.1 by following the steps provided but it works/opens without re-downloading the file for me. Do you have a specific site where you're downloading from that we can test?
Can you test the issue while in Safe Mode? You can find helpful info here : https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode .
Also a fresh new profile could help. You can find more about creating a new profile here : https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems#w_6-create-a-new-firefox-profile .
If possible, you can test this issue on the nightly build as well. Download the build from : https://www.mozilla.org/en-US/firefox/nightly/all/ .
I can reproduce this issue in Safe Mode with Firefox 88.0.1. I will now try the latest release.
I created a new profile and started Firefox 89.0 with it. Then clicking on a CSV file on disk offers two choices: to open it in an external application or to save it to disk. If you choose save to disk, a new copy of the file is created in the Downloads folder. And if you tick the box to make that the default, then every time you click on the CSV file a new copy will be created.
This is consistent with clicking to download a file from a website, so not strictly a bug, but I think the user interface is a bit unfortunate. If something is already on local disk it's unlikely you will want to 'download' it again, so a choice should be offered, even if you have asked for download to be the default. That default is what the user chose for web links, but it shouldn't be the silently chosen default for local file access. (In my opinion.)
I guess I was expecting that browsing to c:\users\me\downloads in the URI bar would be a similar experience to clicking on the Downloads icon in the top toolbar. When you click that icon and it shows you a list of files, and you click on one of them, it launches that file directly -- it certainly doesn't try to download it again and save a new copy! Yet when viewing the same list of files by browsing to the directory, the behaviour is quite different. I'm not saying the two should behave exactly the same way, but I think there is room to make local disk browsing act a bit different to website browsing, even if download-and-save-to-disk is the default action for the latter.
Comment 7•4 years ago
•
|
||
I think we should respect the user intention, and if they want to download a file, why not allowing it?
What I find confusing in this case is:
And if you tick the box to make that the default, then every time you click on the CSV file a new copy will be created.
This is imo more problematic and confusing, maybe we should be hiding/disable the checkbox for local files.
Though, with the new project about always downloading, it's unclear how this should be handled, opinions?
Comment 8•4 years ago
|
||
(In reply to Ed Avis from comment #6)
I created a new profile and started Firefox 89.0 with it. Then clicking on a CSV file on disk offers two choices: to open it in an external application or to save it to disk. If you choose save to disk, a new copy of the file is created in the Downloads folder. And if you tick the box to make that the default, then every time you click on the CSV file a new copy will be created.
OK, I believe this is fixed by bug 1555637 - we will keep asking you what to do, instead of creating copies immediately. This fix is not yet in Firefox 89, but it will be in Firefox 90. You can test it out by downloading beta from https://beta.mozilla.org/ , or you can wait for the release of Firefox 90 (next month).
(In reply to Marco Bonardo [:mak] from comment #7)
I think we should respect the user intention, and if they want to download a file, why not allowing it?
What I find confusing in this case is:
And if you tick the box to make that the default, then every time you click on the CSV file a new copy will be created.
This is imo more problematic and confusing, maybe we should be hiding/disable the checkbox for local files.
Though, with the new project about always downloading, it's unclear how this should be handled, opinions?
I think for now we can leave this as-is, but we can leave the bug open to hide the checkbox as well, and/or come up with something better than the dialog (which might just mean opening with the system handler, as the rest of comment #6 suggested?)
I can confirm that with Firefox 90.0b12 (64-bit) I get prompted each time when browsing the Downloads directory. It doesn't create a new copy of a file just by clicking on it -- only when you explicitly choose Save to disk, which I guess is fair enough.
However, with that beta release, the Open with Firefox option doesn't work, giving an unknown error. I'll upload a screenshot. Let me know whether this should be filed as a separate bug.
| Reporter | ||
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
(In reply to Ed Avis from comment #9)
I can confirm that with Firefox 90.0b12 (64-bit) I get prompted each time when browsing the Downloads directory. It doesn't create a new copy of a file just by clicking on it -- only when you explicitly choose Save to disk, which I guess is fair enough.
However, with that beta release, the Open with Firefox option doesn't work, giving an unknown error. I'll upload a screenshot. Let me know whether this should be filed as a separate bug.
Ugh, yes, that is annoying. It is PDF-specific, and is tracked in bug 1680147. I have a work-in-progress patch there from right before I went on 2 weeks of holiday. I don't remember (holiday does that to me, apparently...) why I didn't request review on it, but I'll try and get that fixed. Thanks for the very quick test and the reminder!
Comment 12•4 years ago
|
||
With bug 1680147 fixed in Firefox 91, PDF files opened from directory listings will now just open.
Updated•1 year ago
|
Description
•