Fix error when opening root directory
This commit is contained in:
1 parent
f1c004411c
commit
3cc4cd1ada
1 file changed
+3
-1
@@ -276,6 +276,7 @@ end
|
||||
|
||||
|
||||
function common.normalize_path(filename)
|
||||
if not filename then return end
|
||||
if PATHSEP == '\\' then
|
||||
filename = filename:gsub('[/\\]', '\\')
|
||||
local drive, rem = filename:match('^([a-zA-Z])(:.*)')
|
||||
@@ -290,7 +291,8 @@ function common.normalize_path(filename)
|
||||
table.insert(accu, part)
|
||||
end
|
||||
end
|
||||
return table.concat(accu, PATHSEP)
|
||||
local npath = table.concat(accu, PATHSEP)
|
||||
return npath == "" and PATHSEP or npath
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user