forked from izaya/LuPPC
fix listing empty dirs
This commit is contained in:
parent
2867038094
commit
2d386f1276
@ -123,7 +123,7 @@ function filesystem.register(basePath, uuid)
|
|||||||
end
|
end
|
||||||
function fs.list(path)
|
function fs.list(path)
|
||||||
checkArg(1, path, "string")
|
checkArg(1, path, "string")
|
||||||
return native.fs_list(realpath(path)) --TODO: Test, check if dirs get / at end
|
return native.fs_list(realpath(path)) or {} --TODO: Test, check if dirs get / at end
|
||||||
end
|
end
|
||||||
function fs.lastModified(path)
|
function fs.lastModified(path)
|
||||||
checkArg(1, path, "string")
|
checkArg(1, path, "string")
|
||||||
@ -159,4 +159,4 @@ function filesystem.register(basePath, uuid)
|
|||||||
return modules.component.api.register(uuid, "filesystem", fs)
|
return modules.component.api.register(uuid, "filesystem", fs)
|
||||||
end
|
end
|
||||||
|
|
||||||
return filesystem
|
return filesystem
|
||||||
|
Loading…
Reference in New Issue
Block a user