Skip to content

Commit

Permalink
fix(rooter): normalization of path "/" should be "/"
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Apr 29, 2024
1 parent 8a0c57b commit 60db5cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/astrocore/rooter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function M.normpath(path)
path = home .. path:sub(2)
end
path = path:gsub("\\", "/"):gsub("/+", "/")
return path:sub(-1) == "/" and path:sub(1, -2) or path
return (path:sub(-1) == "/" and path ~= "/") and path:sub(1, -2) or path
end

--- Resolve the root detection function for a given spec
Expand Down

0 comments on commit 60db5cc

Please sign in to comment.