From 7fa61e115e1a5d4935ec77310a91d262d00e8a21 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sun, 30 Jul 2023 17:35:00 +1000 Subject: [PATCH] cleanup and sanity checks --- module/fs.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/fs.lua b/module/fs.lua index bc8e161..e77bfb5 100644 --- a/module/fs.lua +++ b/module/fs.lua @@ -116,12 +116,12 @@ function fs.address(path) -- string -- string -- Returns the address of the file end function fs.type(path) -- string -- string -- Returns the component type of the filesystem at a given path, if applicable local fsi,_ = fs.resolve(path) - return fsmounts[fsi].type or "filesystem" + return fsmounts[fsi].fstype or fsmounts[fsi].type or "filesystem" end fsmounts["/"] = component.proxy(computer.tmpAddress()) fs.makeDirectory("temp") -if computer.getBootAddress then +if computer.getBootAddress and component.type(computer.getBootAddress()) == "filesystem" then fs.makeDirectory("boot") fs.mount("boot",component.proxy(computer.getBootAddress())) end