mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(explorer.tree): only strip trasiling forward slashes if not at root. Closes #2375
This commit is contained in:
parent
a8930bdb61
commit
72dc6213f7
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
local uv = vim.uv or vim.loop
|
local uv = vim.uv or vim.loop
|
||||||
|
|
||||||
local function norm(path)
|
local function norm(path)
|
||||||
return svim.fs.normalize(path):gsub("/$", "")
|
return svim.fs.normalize(path):gsub("/$", ""):gsub("^$", "/")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function assert_dir(path)
|
local function assert_dir(path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue