mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 02:28:05 +11:00
made ufs work a bit better when programs try to access /
This commit is contained in:
parent
f2de219206
commit
eb1a86af03
@ -15,7 +15,7 @@ function fs.resolve(path)
|
|||||||
rpath = rpath .. segments[i] .. "/"
|
rpath = rpath .. segments[i] .. "/"
|
||||||
end
|
end
|
||||||
rpath = rpath:match("(.+)/") or rpath
|
rpath = rpath:match("(.+)/") or rpath
|
||||||
return segments[1],rpath
|
return segments[1] or "root",rpath
|
||||||
end
|
end
|
||||||
|
|
||||||
-- generate some simple functions
|
-- generate some simple functions
|
||||||
@ -84,6 +84,7 @@ function fs.rename(from,to)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
fs.mounts.temp = component.proxy(computer.tmpAddress())
|
fs.mounts.temp = component.proxy(computer.tmpAddress())
|
||||||
if computer.getBootAddress then
|
if computer.getBootAddress then
|
||||||
fs.mounts.boot = component.proxy(computer.getBootAddress())
|
fs.mounts.boot = component.proxy(computer.getBootAddress())
|
||||||
@ -91,3 +92,23 @@ end
|
|||||||
for addr, _ in component.list("filesystem") do
|
for addr, _ in component.list("filesystem") do
|
||||||
fs.mounts[addr:sub(1,3)] = component.proxy(addr)
|
fs.mounts[addr:sub(1,3)] = component.proxy(addr)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function rf()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
fs.mounts.root = {}
|
||||||
|
|
||||||
|
for k,v in pairs(fs.mounts.temp) do
|
||||||
|
fs.mounts.root[k] = rf
|
||||||
|
end
|
||||||
|
function fs.mounts.root.list()
|
||||||
|
local t = {}
|
||||||
|
for k,v in pairs(fs.mounts) do
|
||||||
|
t[#t+1] = k
|
||||||
|
end
|
||||||
|
t.n = #t
|
||||||
|
return t
|
||||||
|
end
|
||||||
|
function fs.mounts.root.isReadOnly()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user