mirror of
https://github.com/kepler155c/opus
synced 2025-10-15 07:47:40 +00:00
better startup
This commit is contained in:
@@ -284,6 +284,23 @@ function fs.mount(path, fstype, ...)
|
||||
return node
|
||||
end
|
||||
|
||||
function fs.loadTab(path)
|
||||
local mounts = Util.readFile(path)
|
||||
if mounts then
|
||||
for _,l in ipairs(Util.split(mounts)) do
|
||||
if l:sub(1, 1) ~= '#' then
|
||||
local s, m = pcall(function()
|
||||
fs.mount(table.unpack(Util.matches(l)))
|
||||
end)
|
||||
if not s then
|
||||
printError('Mount failed')
|
||||
printError(l)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function getNodeByParts(parts)
|
||||
local node = fs.nodes
|
||||
|
||||
|
Reference in New Issue
Block a user