ws-cleanup-types: Types, api, host: honest annotations; return the full annotated value count
This commit is contained in:
1 parent
59a0352ca6
commit
f209801579
22 files changed
+147
-147
No files matched your search
@@ -59,7 +59,7 @@ function Methods.read(self: any, name: string): (buffer?, Err.Err?)
|
||||
return nil, Err.new(Err.ARG, "no entry named " .. tostring(name))
|
||||
end
|
||||
if e.data then
|
||||
return e.data
|
||||
return e.data, nil
|
||||
end
|
||||
if e.load then
|
||||
local ok, b, err = pcall(e.load)
|
||||
@@ -69,9 +69,9 @@ function Methods.read(self: any, name: string): (buffer?, Err.Err?)
|
||||
if not b then
|
||||
return nil, err or Err.new(Err.CORRUPT, "entry " .. name .. ": decode failed")
|
||||
end
|
||||
return b
|
||||
return b, nil
|
||||
end
|
||||
return buffer.create(0)
|
||||
return buffer.create(0), nil
|
||||
end
|
||||
|
||||
-- add(name, data, opts?) -> (): opts.mtime (unix seconds), opts.dir, opts.mode; replaces an entry of the same name
|
||||
|
||||
Reference in new issue
Block a user