From 42e3bafb8383e12eba9bdafb98a14e83dbfe86bb Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 31 Oct 2023 20:40:51 +0800 Subject: Nvim config: Fix walk up bug for /. --- configs/nvim/lua/crupest/system/fs.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/nvim/lua/crupest/system') diff --git a/configs/nvim/lua/crupest/system/fs.lua b/configs/nvim/lua/crupest/system/fs.lua index 2f489c3..d34c2f6 100644 --- a/configs/nvim/lua/crupest/system/fs.lua +++ b/configs/nvim/lua/crupest/system/fs.lua @@ -1,4 +1,5 @@ local function clean_path(path) + if path == "/" then return path end path = string.gsub(path, "[/\\]+", "/") if string.sub(path, string.len(path)) == '/' then path = string.sub(path, 1, string.len(path) - 1) -- cgit v1.2.3