Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trash portal failed when .var directory is a bind mount #1644

Open
ogarcia opened this issue Feb 19, 2025 · 0 comments
Open

Trash portal failed when .var directory is a bind mount #1644

ogarcia opened this issue Feb 19, 2025 · 0 comments
Labels

Comments

@ogarcia
Copy link

ogarcia commented Feb 19, 2025

Operating System

Arch Linux

XDG Desktop Portal version

1.18

XDG Desktop Portal version (Other)

No response

Desktop Environment

GNOME

Desktop Environment (Other)

No response

Expected Behavior

If cannot use the trash, the system should warn the user and let him/her decide what to do (whether to delete permanently or not to do anything).

Current Behavior

When your .var directory is a bind mount the system has no trash. In native (not flatpack) applications like Nautilus the system is aware of this and when you are going to delete a file it alerts you to this fact.

For example, in an application like Workbench when closing a project and discarding it, the program tries to send it to the trash giving this error (and as a result the window cannot be closed).

(re.sonny.Workbench:5): re.sonny.Workbench-CRITICAL **: 08:18:17.359: Gio.IOErrorEnum: Trash portal failed on /home/ogarcia/.var/app/re.sonny.Workbench/data/re.sonny.Workbench/sessions/2025-02-19 08-16-34
removeDirectory@resource:///re/sonny/Workbench/util.js:172:10
deleteSession@resource:///re/sonny/Workbench/sessions.js:94:10
onCloseSession@resource:///re/sonny/Workbench/window.js:486:11
Window/<@resource:///re/sonny/Workbench/window.js:406:19
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

Steps to Reproduce

  1. Mount a drive in any directory, for example /mnt.
  2. Create a subdirectory /mnt/myvar.
  3. Bind mount /mnt/myvar as your ~/.var directory.
  4. Install workbench.
  5. Open a project.
  6. Try to close it discarding changes.
  7. Profit 😂

Anything else we should know?

Related issue in Workbench repository

@ogarcia ogarcia added the bug label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant