Skip to content

WIP: udisks2: Include only direct subdirectories of /media

Ondrej Holy requested to merge wip/oholy/udisks2-media-user into master

Currently, all mounts with /media prefix are returned from the volume monitor (except those with x-gvfs-hide, or dot at the beginning). However, some distributions don't use /run/media/$USER, but /media/$USER as the default prefix. Consequently, the volume monitor also returns mounts that are not accessible as they belong to other users, which is wrong. It would be ideal to check the mounts using e.g. access (mount_path, R_OK), but this would automount autofs mounts, or would possibly hang on stale NFS mounts. Let's skip mounts that are not direct subdirectories of /mount with an exception for /media/$USER and those with x-gvfs-show to fix this issue.

https://discourse.gnome.org/t/4546

Merge request reports