firefox uses home dir for downloads instead of downloads directory
Categories
(Firefox :: File Handling, defect)
Tracking
()
People
(Reporter: bugs, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Steps to reproduce:
In firefox 98 the change to downloads results in temporary downloads being saved in home directory (on linux), with always ask.
- Download a file
- Prompt displayed choose "open with" application
- File is opened in application, but file is also downloaded to home directory.
Actual results:
(as above)
Note that Download is set to "Always ask where to download files"
Expected results:
temporary(*) file should be downloaded to temp directory.
(*) Hence why using "Open With"
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 correct in case you think the bot is wrong.
Updated•4 years ago
|
This isn't a duplicate. As much as I prefer the old behaviour, the download dir was set to ~/Downloads but files were saved to ~ .
(After an upgrade from previous firefox on debian).
Comment 4•4 years ago
|
||
Why isn't it a duplicate? It's making exactly the same points that you are in this bug.
Because the save directory was set to /home/user/Downloads but files saved with "Open with" were saved into /home/user (which is not set as a directory anywhere in preferences, either in the dialog or about:config).
(Cluttering up downloads is one thing, but filling $HOME is difficult as its not easily possible to disinguish downloaded files from others)
Updated•4 years ago
|
Comment 6•4 years ago
|
||
(In reply to Andrew King from comment #3)
This isn't a duplicate. As much as I prefer the old behaviour, the download dir was set to ~/Downloads but files were saved to ~ .
Can you confirm the values of browser.download.dir, browser.download.lastDir and browser.download.folderList in about:config ? The settings page will show your OS's concept of the "default downloads dir" as "Downloads", irrespective of the folder it is, and so it may be misleading you (that's bug 1707462). If we can't detect a default downloads folder (quite possible depending on the linux distro/setup), desktop and then the home directory are used as fallbacks for the downloads directory (I mean, we've gotta assume you want the files somewhere!).
Another check just to be on the safe side: does ~/Downloads exist and is it writable?
They are currently
browser.download.dir = /tmp (I manually changed this, trying to get previous behaviour back) **
browser.download.lastDir = (a directory I have used to save previously)
browser.download.folderList = 2
** I upgraded on a different machine, and
browser.download.dir = (doesn't exist)
browser.download.folderList = 1
~/Downloads exists, and is shown in the interface as the location for "Save files to" - obviously this is different to the result (which is home), probably as browser.download.dir is unset.
Comment 8•4 years ago
|
||
(In reply to Andrew K from comment #7)
They are currently
browser.download.dir = /tmp (I manually changed this, trying to get previous behaviour back) **
browser.download.lastDir = (a directory I have used to save previously)
browser.download.folderList = 2
So I'm a bit confused (sorry!) because of the 2 sets of answers - is the setup with these 3 prefs above (now) working, or still saving files into $HOME despite browser.download.dir indicating you want them in /tmp?
** I upgraded on a different machine, and
browser.download.dir = (doesn't exist)
browser.download.folderList = 1~/Downloads exists, and is shown in the interface as the location for "Save files to" - obviously this is different to the result (which is home), probably as browser.download.dir is unset.
OK, so in the second set of prefs, folderList being 1 indicates it's supposed to use the system default downloads directory, and Firefox will try to follow your XDG user preferences to find out what that is. I have a few different sets of questions about this different machine:
- do you have any XDG environment variables set, e.g. does
XDG_CONFIG_HOMEexist, and does a file calleduser-dirs.dirsexist anywhere in$HOMEor$HOME/.configor similar? Does that define a system downloads directory? - does setting
browser.download.dirto/home/<username>/Downloadsandbrowser.download.folderListto 2 in about:config, fix the issue? - are you by any chance using a snap or flatpak build of Firefox? (If you're not sure about this, you can check in about:support, under "Application Binary", if the path starts with
/snap/or contains it, it's probably a snap build) - what window manager / desktop environment / distro is this happening under?
The first case is working (after manually setting).
.config/user-dirs.dirs
- has a XDG_DOWNLOAD_DIR="$HOME/", no env variables set though
- it seems to (w.r.t this bug).
- no, native install
- xfce on debian 11.
It's quite possible that ff appears to be doing the right thing. But, on an update "Always ask you where to save files" was already set, and "Save files to" was set to "Downloads" (but greyed out). It's wasn't obvious why my home dir was being filled with temporary downloads.
Probably at least on update, the following should be set if "Always ask you where to save files" is set.
browser.download.dir = /tmp
browser.download.folderList = 2
Comment 10•4 years ago
|
||
(In reply to Andrew K from comment #9)
Probably at least on update, the following should be set if "Always ask you where to save files" is set.
browser.download.dir = /tmp
browser.download.folderList = 2
This would probably confuse people who are fine with the current setup, and would break for snap users (where Firefox can't write to /tmp). A lot of the complaints around the change are about "Firefox changed my settings without asking"; I am skeptical that changing some more settings without asking will make anything better. :-(
It seems like the real problem here is that the UI does not reasonably reflect what is happening, which we will fix in bug 1707462 and bug 1762775. I'll dupe this over to bug 1707462 as even just changing that would probably have helped you here (ie if the folder selector said "/home/username" instead of "Downloads"
Updated•4 years ago
|
Comment 12•4 years ago
|
||
(We're still evaluating what to do about the tmp dir; updates will appear in bug 1738574)
Description
•