Made filesystem.isLink return the destination of the link as a second value, if it is one.

This commit is contained in:
Florian Nücke 2014-08-15 01:04:38 +02:00
parent 9327762d95
commit 3a9f6b0311

View File

@ -157,7 +157,10 @@ end
function filesystem.isLink(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
function filesystem.link(target, linkpath)