From 5679885592b6ab9507f3bc597cc9fe864548e08b Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Wed, 14 Oct 2020 17:20:12 +1100 Subject: [PATCH] fix cached file type, and cache whether the filesystem is read only --- MTFS/OpenOS/usr/bin/importfs.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MTFS/OpenOS/usr/bin/importfs.lua b/MTFS/OpenOS/usr/bin/importfs.lua index 3bb6026..159912a 100644 --- a/MTFS/OpenOS/usr/bin/importfs.lua +++ b/MTFS/OpenOS/usr/bin/importfs.lua @@ -44,7 +44,7 @@ if px.dirstat then -- use single call for file info end local ci = statcache["/"..fs.canonical(p)] if ci then - return ci[3] + return ci[n] end end function px.isDirectory(path) @@ -57,4 +57,8 @@ if px.dirstat then -- use single call for file info return gce(path, 4) or olm(path) end end +local iro = px.isReadOnly() +function px.isReadOnly() + return iro +end fs.mount(px, lpath)