From 3a9f6b03110c4bf0d33e61ad47706fa8a398e4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Fri, 15 Aug 2014 01:04:38 +0200 Subject: [PATCH] Made filesystem.isLink return the destination of the link as a second value, if it is one. --- .../assets/opencomputers/loot/OpenOS/lib/filesystem.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/opencomputers/loot/OpenOS/lib/filesystem.lua b/src/main/resources/assets/opencomputers/loot/OpenOS/lib/filesystem.lua index 83d528124..0ab4e4e63 100644 --- a/src/main/resources/assets/opencomputers/loot/OpenOS/lib/filesystem.lua +++ b/src/main/resources/assets/opencomputers/loot/OpenOS/lib/filesystem.lua @@ -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)