From c78bb7b32c69c32e8e2310f53e502382e64deea8 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Wed, 20 Nov 2019 21:08:31 +1100 Subject: [PATCH] made unionfs read correctly --- lib/unionfs.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/unionfs.lua b/lib/unionfs.lua index a91b373..b6898b5 100644 --- a/lib/unionfs.lua +++ b/lib/unionfs.lua @@ -19,6 +19,10 @@ function unionfs.create(...) end return paths[1].."/"..path end + + function proxy.setLabel() + return false + end function proxy.spaceUsed() return fs.spaceUsed(paths[1]) @@ -35,6 +39,9 @@ function unionfs.create(...) function proxy.lastModified(path) return fs.lastModified(realpath(path)) end + function proxy.getLabel() + return fs.getLabel(paths[1]) + end function proxy.exists(path) return fs.exists(realpath(path)) @@ -91,7 +98,9 @@ function unionfs.create(...) if not fids[fid] then return false, "file not open" end - return fids[fid]:read(d) + local rb = fids[fid]:read(d) + if rb == "" then rb = nil end + return rb end function proxy.seek(fid,d) if not fids[fid] then