1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-21 11:35:44 -05:00

skip mounting any already mounted filesystems

This commit is contained in:
XeonSquared 2023-10-07 11:35:15 +10:00
parent 91d9ce33c8
commit 638322c157

View File

@ -3,6 +3,11 @@ fsmanager.filesystems = {}
local run = true
function fsmanager.mount(addr)
for k,v in ipairs(fs.mounts()) do
if fs.address(v) == addr then
return
end
end
dest = "/" .. (component.invoke(addr,"getLabel") or "mnt/"..addr:sub(1,3))
syslog("Mounting "..addr.." to "..dest)
fs.makeDirectory(dest)