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

Trashing on external drive does not work on Linux #512

Closed
DarkKronicle opened this issue Jan 14, 2024 · 3 comments
Closed

Trashing on external drive does not work on Linux #512

DarkKronicle opened this issue Jan 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@DarkKronicle
Copy link

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

Kitty v0.31.0

Yazi version

yazi 0.1.5 (e41266d 2024-01-13)

Did you try the latest main branch to see if the problem has already been fixed?

Tried, but the problem is still present

Describe the bug

On Linux, when trashing a file on a different drive it fails because it tries to trash. This is because it tries to trash the file at /run/.Trash-1000 instead of <MOUNTPOINT>/.Trash-<UID>. (i.e. if you have a drive mountained at /run/darkkronicle/cooldrive, it should trash in /run/darkkronicle/cooldrive/.Trash-1000

Error within yazi task:

Failed to work on this task: Error during a `trash` operation: FileSystem { path: "/run/.Trash-1000", kind: PermissionDenied }

Related: #246 and Byron/trash-rs#57

Expected Behavior

When moving file to trash on a different drive, it should go to the correct trash folder, and not error out.

To Reproduce

  1. Have a mounted drive on linux that is not the $HOME directory.
  2. In yazi, go to any file in there and press d to delete it.
  3. See that the task never gets completed, and has an error.

Configuration

No response

Anything else?

No response

@DarkKronicle DarkKronicle added the bug Something isn't working label Jan 14, 2024
@DarkKronicle
Copy link
Author

Looking at trash-rs, the issue was it was selecting my /run directory as the top level mount. I have created a pull request to hopefully fix this Byron/trash-rs#97

@DarkKronicle
Copy link
Author

It's been fixed in upstream. Tested after running cargo update, and it's all good now!

Copy link

I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant