mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
Made filesystem.isLink return the destination of the link as a second value, if it is one.
This commit is contained in:
parent
9327762d95
commit
3a9f6b0311
@ -157,7 +157,10 @@ end
|
|||||||
|
|
||||||
function filesystem.isLink(path)
|
function filesystem.isLink(path)
|
||||||
local node, rest, vnode, vrest = findNode(filesystem.path(path))
|
local node, rest, vnode, vrest = findNode(filesystem.path(path))
|
||||||
return not vrest and vnode.links[filesystem.name(path)] ~= nil
|
if not vrest and vnode.links[filesystem.name(path)] ~= nil then
|
||||||
|
return true, vnode.links[filesystem.name(path)]
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function filesystem.link(target, linkpath)
|
function filesystem.link(target, linkpath)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user