Skip to content
Snippets Groups Projects
Commit 147ac51f authored by Matthias Clasen's avatar Matthias Clasen Committed by Philip Withnall
Browse files

trash portal: Fix permission checks

Implement the approach suggested in
https://gitlab.gnome.org/GNOME/glib/merge_requests/276

1. Try to open O_RDWR. On success, pass that fd
2. If EACCESS => fail the trash op, we "need" read-write to successfully trash it
3. If EISDIR => re-open the fd with O_PATH, and pass that (which will fail on snap,
   but verify the dir for flatpaks)
parent 7fa9a2a5
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment