fix(util): remove double forward slashes

This commit is contained in:
Folke Lemaitre 2022-12-31 09:55:50 +01:00
parent 3da6c74ed3
commit ed0583e82b
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ function M.norm(path)
end end
path = home .. path:sub(2) path = home .. path:sub(2)
end end
path = path:gsub("\\", "/") path = path:gsub("\\", "/"):gsub("/+", "/")
return path:sub(-1) == "/" and path:sub(1, -2) or path return path:sub(-1) == "/" and path:sub(1, -2) or path
end end