aboutsummaryrefslogtreecommitdiff
path: root/configs/nvim/lua/crupest/system/fs.lua
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-10-31 20:40:51 +0800
committercrupest <crupest@outlook.com>2023-10-31 20:40:51 +0800
commit04fb3b13118b4573c442e5e06eaecee1d07e2056 (patch)
tree3e248acd87d3d639d62d5b5e22c0ad93a961d595 /configs/nvim/lua/crupest/system/fs.lua
parente55f6a38f61672782775845745fc475e5a9ec720 (diff)
downloadcrupest-04fb3b13118b4573c442e5e06eaecee1d07e2056.tar.gz
crupest-04fb3b13118b4573c442e5e06eaecee1d07e2056.tar.bz2
crupest-04fb3b13118b4573c442e5e06eaecee1d07e2056.zip
Nvim config: Fix walk up bug for /.
Diffstat (limited to 'configs/nvim/lua/crupest/system/fs.lua')
-rw-r--r--configs/nvim/lua/crupest/system/fs.lua1
1 files changed, 1 insertions, 0 deletions
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)