Open Bug 1828169 Opened 2 years ago Updated 10 months ago

FF creates a system Downloads folder, even when a custom downloads folder has been specified.

Categories

(Firefox :: Settings UI, defect, P3)

Desktop
Linux
defect

Tracking

()

People

(Reporter: storehouse, Unassigned, NeedInfo)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0

Steps to reproduce:

  1. New profile.
  2. Change the default download directory to a custom folder, call it ~/f.
  3. Close firefox.
  4. Delete ~/Downloads, because firefox makes it without asking me. Well, fine. It was the default.
  5. Start firefox.

Actual results:

~/Downloads is recreated.

Expected results:

Nothing. I told it to use ~/f !!

(In reply to Eric Toombs from comment #0)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0

Steps to reproduce:

-1. I should add, ensure there is no ~/Downloads.

  1. New profile.
  2. Change the default download directory to a custom folder, call it ~/f.
  3. Close firefox.
  4. Delete ~/Downloads, because firefox makes it without asking me. Well, fine. It was the default.
  5. Start firefox.

Actual results:

~/Downloads is recreated.

Expected results:

Nothing. I told it to use ~/f !!

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Assignee: nobody → storehouse
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Component: Widget: Gtk → Settings UI
Product: Core → Firefox
Severity: -- → S4
Priority: -- → P3

(In reply to Eric Toombs from comment #1)

(In reply to Eric Toombs from comment #0)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0

Steps to reproduce:

-1. I should add, ensure there is no ~/Downloads.

  1. New profile.
  2. Change the default download directory to a custom folder, call it ~/f.
  3. Close firefox.
  4. Delete ~/Downloads, because firefox makes it without asking me. Well, fine. It was the default.
  5. Start firefox.
  1. Open the settings.

Actual results:

~/Downloads is recreated.

Expected results:

Nothing. I told it to use ~/f !!

Sorry, I missed a critical step in the reproduction procedure. This and the fix I submitted to phab should make more sense now.

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: storehouse → nobody
Status: ASSIGNED → NEW
Duplicate of this bug: 1898481

Reposting my comment from the dupe:

getSystemDownloadsDirectory creates a Downloads directory under Home if DfltDwnld is not set in the DirectoryService, that ends up in https://searchfox.org/mozilla-central/rev/a44891c52387ca4bd7c35b50f0d335f3980ef36a/xpcom/io/nsDirectoryService.cpp#423 that asks for Unix_XDG_Download that is apparently not set on your system.

There's various calls to getSystemDownloadsDirectory, and I suspect it's a requirement to have a default system downloads directory, as a fallback.
It may be possible to change the code to avoid creating the folder unless it's strictly necessary, though that's not a high priority considered it's a minor annoyance in most cases.

The code still uses browser.download.folderList that comes from time where the Preferences ui was showing a dropdown list, it could probably be cleaned up, but I'm not sure if it could be avoided completely.

Flags: needinfo?(gijskruitbosch+bugs)
Severity: S4 → S3
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: