Fix problem when project directory has a trailing slash
This commit is contained in:
1 parent
7f9e4e4984
commit
fcf763fe9c
4 files changed
+28
-14
No files matched your search
@@ -196,6 +196,13 @@ function common.serialize(val)
|
||||
end
|
||||
|
||||
|
||||
function common.basename(path)
|
||||
-- a path should never end by / or \ except if it is '/' (unix root) or
|
||||
-- 'X:\' (windows drive)
|
||||
return path:match("[^\\/]+$") or path
|
||||
end
|
||||
|
||||
|
||||
function common.home_encode(text)
|
||||
if HOME then
|
||||
local n = #HOME
|
||||
|
||||
Reference in new issue
Block a user