mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 19:56:17 -04:00
Fixed filesystem module misbehaving when no fs is mounted at root level.
This commit is contained in:
parent
5fb147e58c
commit
3913cf3fdc
@ -299,11 +299,11 @@ end
|
|||||||
|
|
||||||
function filesystem.list(path)
|
function filesystem.list(path)
|
||||||
local node, rest, vnode, vrest = findNode(path)
|
local node, rest, vnode, vrest = findNode(path)
|
||||||
if not vnode.fs and vrest and not node.fs then
|
if not vnode.fs and vrest and not (node and node.fs) then
|
||||||
return nil, "no such file or directory"
|
return nil, "no such file or directory"
|
||||||
end
|
end
|
||||||
local result, reason
|
local result, reason
|
||||||
if node.fs then
|
if node and node.fs then
|
||||||
result, reason = node.fs.list(rest or "")
|
result, reason = node.fs.list(rest or "")
|
||||||
end
|
end
|
||||||
result = result or {}
|
result = result or {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user