From 540847b7cb4afc66fea0d7a539821431c5a2b216 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 21 Dec 2022 10:17:10 +0100 Subject: [PATCH] fix: strip `/` from dirs. Fixes #60 --- lua/lazy/core/util.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index f63807b..50d207e 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -35,7 +35,8 @@ function M.norm(path) end path = home .. path:sub(2) end - return path:gsub("\\", "/") + path = path:gsub("\\", "/") + return path:sub(-1) == "/" and path:sub(1, -2) or path end function M.try(fn, msg)