fix: strip `/` from dirs. Fixes #60

This commit is contained in:
Folke Lemaitre 2022-12-21 10:17:10 +01:00
parent 86eaa118c6
commit 540847b7cb
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 1 deletions

View File

@ -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)