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