File browser opens to 'Recent' directory instead of the default download location when downloading blobs/files on Linux
Storage Explorer Version: 1.36.0 (101) Build Number: 20241012.1 Branch: rel/1.36.0 Platform/OS: Linux Ubuntu 22.04 Architecture: x64 How Found: From running test cases Regression From: Previous release (1.34.0)
Steps to Reproduce
- Open 'Settings -> Transfers -> Default Download Location' -> Type a valid path in the textbox.
- Open one blob container -> Select a blob -> Click 'Download'.
- Check whether file browser opens to the default download location.
Expected Experience
File browser opens to the default download location.
Actual Experience
File browser opens to 'Recent' location.
Additional Context
- This issue doesn't reproduce for tables/disks.
- This issue doesn't reproduce on Windows x64/Windows arm64/Mac arm64.
@v-kellyluo Please specify whether this reproduces for snaps, the .tar.gz, or both.
This is actually a very known and very old problem (see electron/electron#33804).
What happens if you select a location that is not a child location of the user's home directory?
Hi @craxal , this issue reproduces for snaps and .tar.gz, and it doesn't reproduce on 1.34.0, here are the records:
- On 1.34.0:
- On build 20241015.1:
- In addition, I am not sure whether the bug you are talking about is 5363, but this bug is different from it. For this bug, we need to set a default download location first, and check if the file browser opens to the default location.
@v-kellyluo Yes, I think that's the one. The bug may be different, but I believe the root cause is the same, because they all eventually invoke a native file dialog. And the problem with the native dialog has been known for a long time.
As long as the desired location can still be navigated, I do not think this is a blocking issue. We can look into it more after 1.36.0.
@craxal Yes, we can manually select the destination location, will verify this bug after it is fixed.
Found a possible solution/workaround: https://snapcraft.io/docs/xdg-desktop-portals.
In a nutshell, we can drop the home and removable-media interfaces and add the desktop interface. Since Electron already supports desktop portals, that should theoretically resolve this issue.
Since this is not blocking anyone, we won't focus on looking for a fix.