scandir() listet kein "." und ".." mehr (Fixt #3?)
This commit is contained in:
parent
84e5c8d7db
commit
4028a9cea1
@ -578,9 +578,11 @@ 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
|
||||||
|
if filename ~= "." and filename ~= ".." then
|
||||||
i = i + 1
|
i = i + 1
|
||||||
t[i] = filename
|
t[i] = filename
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user