nuageinit: fix dirname('/') returning nil instead of '/'
This commit is contained in:
@@ -93,6 +93,9 @@ local function dirname(oldpath)
|
||||
end
|
||||
local path = oldpath:gsub("[^/]+/*$", "")
|
||||
if path == "" then
|
||||
if oldpath:sub(1, 1) == "/" then
|
||||
return "/"
|
||||
end
|
||||
return nil
|
||||
end
|
||||
return path
|
||||
|
||||
Reference in New Issue
Block a user