Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion miniOS/miniOS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ function fs_code()
end
function fs.write(handle, data) return handle._proxy.write(handle._handle, data) end
function fs.read(handle, length) return handle._proxy.read(handle._handle, length or math.huge) end
function fs.seek(handle, mode, position) return handle._proxy.seek(handle._handle, mode, position) end
function fs.close(handle) return handle._proxy.close(handle._handle) end
function fs.isDirectory(path)
local drive
Expand Down Expand Up @@ -1430,7 +1431,11 @@ local function runfile(file, ...)
result = {interrupt(result[2])}
return
end end end
error(result[2] .. "\n" .. traceback, 3)
if traceback then
error(result[2] .. "\n" .. traceback, 3)
else
error(result[2], 3)
end
end
else
error(reason, 3)
Expand Down