fixed metafile and list bug

This commit is contained in:
2026-02-01 01:40:28 -05:00
parent 4f50d90b79
commit ea2a0e0e94
3 changed files with 8 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ local function normalizePath(path)
table.insert(parts, part)
end
end
return "/" .. table.concat(parts, "/") .. (path:sub(-1) == "/" and "/" or "")
return "/" .. table.concat(parts, "/")
end
-- Resolve mount and disk path
@@ -142,6 +142,9 @@ local function getFileMeta(path)
if parent ~= "/" then parent = parent .. "/" end
local target = parts[i]
if target == ".meta" then
error("Cannot open metafile")
end
local metaPath = parent .. ".meta"
if disk:fileExists(metaPath) then
@@ -526,5 +529,7 @@ sys["exists"] = vfs.exists
sys["type"] = vfs.type
sys["mount"] = vfs.mount
sys["umount"] = vfs.umount
sys["getcwd"] = vfs.getcwd
sys["chdir"] = vfs.chdir
kernel.log("VFS module loaded")