Open rowanworth opened 1 year ago
Were there no errors listed in your console?
The default view upon opening the file picker shows a blank area where the grid of icons should be, and the path is displayed as:
/ global home
It sounds like maybe it's not getting your home directory correct perhaps - as it should be in the path... maybe a screenshot would help?
This is the only thing I see in the console:
2023/08/02 11:02:54 Fyne error: Getting favorite locations
2023/08/02 11:02:54 Cause: this computer does not define a VIDEOS folder
2023/08/02 11:02:54 At: /localData/rowanw/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/dialog/file.go:303
However I believe this relates to the "favorite folders" list and is unrelated to painting the current directory/file list (xdg-user-dir VIDEO
returns the same path as my home folder, which causes getFavoriteLocation()
in dialog/file_xdg.go
to return this non-fatal error).
Here's a simple recipe to replicate the scenario in /tmp:
$ mkdir -p /tmp/global/home/rowanworth
$ chmod -r /tmp/global/home
$ export HOME=/tmp/global/home/rowanworth
$ echo hello world >$HOME/README.txt
$ mkdir $HOME/{Downloads,Documents,Music,Pictures,Videos}
$ ./main &
Here's a gif of what browsing that looks like. Note that:
/ tmp global
, even though the file picker starts in /tmp/global/rowanworth
(ie. $HOME)
Checklist
Describe the bug
The environment I'm testing in has directories setup like along these lines:
ie. my user
rowanworth
, who is a member of groupstaff
has full read/write/execute permissions to my home directory/global/home/rowanworth
. However I do not have read permissions on the parent/global/home
directory, only execute permissions. This means the kernel VFS layer allows me to traverse to sub-directories of/global/home/
, but not list its contents.Within Fyne, this manifests as an inability to navigate the file dialog to files in my home directory. The default view upon opening the file picker shows a blank area where the grid of icons should be, and the path is displayed as:
If I toggle between the list/grid view then the files in my home directory do appear - I can also navigate into subdirectories, but I have to toggle the list/grid view every time I change directories, and the path display never goes deeper than
/ global home
.How to reproduce
Screenshots
No response
Example code
The environment is the critical component here rather than the code so I haven't tested this snippet but it should be close to working :)
Fyne version
v2@v2.3.5
Go compiler version
go version go1.18.1 linux/amd64
Operating system and version
Linux Centos 7.7.1908
Additional Information
I'm very new to Fyne so no clue if this should be filed against the FileDialog or some deeper VFS interface.