Merge branch 'master' of github.com:MightyPirates/OpenComputers into master-MC1.7.10

This commit is contained in:
Florian Nücke 2014-08-15 01:05:05 +02:00
commit 093db6798b
2 changed files with 10 additions and 1 deletions

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)

View File

@ -101,6 +101,7 @@ private[oc] object Registry extends api.detail.DriverAPI {
case arg: Array[_] => convertList(arg, arg.zipWithIndex.iterator, memo)
case arg: Product => convertList(arg, arg.productIterator.zipWithIndex, memo)
case arg: Seq[_] => convertList(arg, arg.zipWithIndex.iterator, memo)
case arg: java.lang.Iterable[_] => convertList(arg, arg.zipWithIndex.iterator, memo)
case arg: Map[_, _] => convertMap(arg, arg, memo)
case arg: mutable.Map[_, _] => convertMap(arg, arg.toMap, memo)
@ -116,6 +117,11 @@ private[oc] object Registry extends api.detail.DriverAPI {
memo += arg -> null
null
}
else if (converted.size == 1 && converted.containsKey("oc:flatten")) {
val value = converted.get("oc:flatten")
memo += arg -> value // Update memoization map.
value
}
else {
// This is a little nasty but necessary because we need to keep the
// 'converted' value up-to-date for any reference created to it in