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

Incorrect Trash Path for MacOS #98

Open
DevanTurtle7 opened this issue Aug 13, 2024 · 0 comments
Open

Incorrect Trash Path for MacOS #98

DevanTurtle7 opened this issue Aug 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@DevanTurtle7
Copy link

Describe the bug
The trash_dir variable defined in lua/sidebar-nvim/builtin/files.lua is incorrect for MacOS. This causes an error, since the given path cannot be found. The correct path is $HOME/.Trash/. This means that users on MacOS are unable to delete files using the sidebar.

To Reproduce
Steps to reproduce the behavior:

  1. Open sidebar.nvim in MacOS
  2. Hover over a file in the sidebar
  3. Press the d key
  4. Observer the error

Expected behavior
Deleted files should be moved to $HOME/.Trash and not raise an error.

Screenshots
Screenshot 2024-08-13 at 4 51 45 PM

Environment (please complete the following information):

  • nvim version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Run "nvim -V1 -v" for more info
  • sidebar config
require("sidebar-nvim").setup({
 open = true,
 sections = {"files", "todos", "git"},
 files = {
   show_hidden = true
 }
})
vim.keymap.set("n", "<leader>f", vim.cmd.SidebarNvimFocus)

Additional context
I was able to fix this issue on a personal fork by updating trash_dir to be $HOME/.Trash.

@DevanTurtle7 DevanTurtle7 added the bug Something isn't working label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant