Closed x80486 closed 3 years ago
Well it needs to use the portal for it: https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-org.freedesktop.portal.Trash
gio trash
is a tool to do it if its at all configurable.
I think this ball is entirely on the @syntevo side; I have no idea what is it what is getting executed on the click on that button, except for the (error) message.
By the way, this is a Java application; I guess the way those portals are used outside C/C++ is through bindings, right?
SmartGit move-to-trash feature directly operates on the file system according to the specification from https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html. It works fine on normal Linux machines. At the moment we have no plan to turn the whole code upside down to just work around such FlatPak restrictions.
Then it just is forever broken in all sandboxed applications (Snap, Flatpak, etc).
Alternatively, SmartGit also can use the /usr/bin/trash-put
command.
Alternatively, SmartGit also can use the /usr/bin/trash-put command.
That is more workable, somebody can provide a version of that which works inside the sandbox. I'm not sure where best to request that.
Maybe here: https://github.com/flatpak/flatpak-xdg-utils
Alternatively this package can bundle a simple script in /app/bin/
that is good enough.
This is working automagically. Can't tell if it's because something changed on the SmartGit
side, or because the new GNOME 41
release 🤷🏻♂️
If someone tries to use the "Move to Trash" option within the
Files
panel, it returns an error:I guess the trick is to find out how to access the user's Trash subdirectory/location.