Open Bug 1893522 Opened 1 year ago Updated 1 year ago

Default download location does not work if target is a symlink

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 125
defect

Tracking

()

UNCONFIRMED

People

(Reporter: macavity80, Unassigned)

Details

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

Steps to reproduce:

I'm using Firefox 125 on Linux Ubuntu 23.10.
My /home/cristian/Downloads folder is a symlink that points to a folder on another drive. I want to setup Firefox so that the default download folder is this Downloads folder. So I went to Settings, and under "Files and Applications", on "Save Files to" I clicked on Browse, and pointed to my /home/cristian/Downloads folder.

Actual results:

The destination folder field changed to "/run/user/1000/doc/7db093c1/Downloads⁩" instead of "/home/cristian/Downloads".

Expected results:

Firefox should have accepted the folder I selected. As another possibility, it could have pointed to the symlink's target folder.

I should add that if I choose a different folder that is not a symlink (i.e. /home/cristian/Documents) it works as expected. The problem is only with symlinks.

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

I guess the /run/user/1000/doc/7db093c1/Downloads⁩ is real path where the symlink points to, right?
I think that's a problem with Gtk path selector which follows the symlink.

Does it work if you create /home/cristian/Downloads directory first, select it as Firefox download destinations and then replace it with a symlink? Does Firefox download to /run/user/1000/doc/7db093c1/Downloads⁩ then?

(In reply to Martin Stránský [:stransky] (ni? me) from comment #2)

I guess the /run/user/1000/doc/7db093c1/Downloads⁩ is real path where the symlink points to, right?
I think that's a problem with Gtk path selector which follows the symlink.

It's not, actually. The symlink points to a different drive, the path is something like /Storage/Downloads.

(In reply to Martin Stránský [:stransky] (ni? me) from comment #3)

Does it work if you create /home/cristian/Downloads directory first, select it as Firefox download destinations and then replace it with a symlink? Does Firefox download to /run/user/1000/doc/7db093c1/Downloads⁩ then?

That folder already existed, as it's the default Ubuntu download folder. And I think it's the default Firefox download folder.

Priority: -- → P3

So looks like the open dialog fails to select symlinked download dir and falls back to default one instead.

You need to log in before you can comment on or make changes to this bug.