forked from izaya/OC-PsychOS2
cleanup and sanity checks
This commit is contained in:
parent
87f8bd2149
commit
7fa61e115e
@ -116,12 +116,12 @@ function fs.address(path) -- string -- string -- Returns the address of the file
|
|||||||
end
|
end
|
||||||
function fs.type(path) -- string -- string -- Returns the component type of the filesystem at a given path, if applicable
|
function fs.type(path) -- string -- string -- Returns the component type of the filesystem at a given path, if applicable
|
||||||
local fsi,_ = fs.resolve(path)
|
local fsi,_ = fs.resolve(path)
|
||||||
return fsmounts[fsi].type or "filesystem"
|
return fsmounts[fsi].fstype or fsmounts[fsi].type or "filesystem"
|
||||||
end
|
end
|
||||||
|
|
||||||
fsmounts["/"] = component.proxy(computer.tmpAddress())
|
fsmounts["/"] = component.proxy(computer.tmpAddress())
|
||||||
fs.makeDirectory("temp")
|
fs.makeDirectory("temp")
|
||||||
if computer.getBootAddress then
|
if computer.getBootAddress and component.type(computer.getBootAddress()) == "filesystem" then
|
||||||
fs.makeDirectory("boot")
|
fs.makeDirectory("boot")
|
||||||
fs.mount("boot",component.proxy(computer.getBootAddress()))
|
fs.mount("boot",component.proxy(computer.getBootAddress()))
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user