scandir() Fix
This commit is contained in:
parent
25561ca23a
commit
94328a790f
@ -577,8 +577,10 @@ utilities.char = {
|
|||||||
function scandir(directory)
|
function scandir(directory)
|
||||||
local i, t, popen = 0, {}, io.popen
|
local i, t, popen = 0, {}, io.popen
|
||||||
for filename in popen('ls -a "'..directory..'"'):lines() do
|
for filename in popen('ls -a "'..directory..'"'):lines() do
|
||||||
i = i + 1
|
if filename ~= "." and filename ~= ".." then
|
||||||
t[i] = filename
|
i = i + 1
|
||||||
|
t[i] = filename
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
@ -1000,4 +1002,4 @@ function utilities.fix_utf8(str)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return utilities
|
return utilities
|
||||||
|
Reference in New Issue
Block a user