Diff

mod_storage_appendmap/mod_storage_appendmap.lua @ 2635:4548c3d685b4

mod_storage_appendmap: Successfully return nothing on ENOENT
author Kim Alvefur <zash@zash.se>
date Tue, 21 Mar 2017 15:56:43 +0100
parent 2431:623e23190c3e
child 2796:6a7b7cb7148e
line wrap: on
line diff
--- a/mod_storage_appendmap/mod_storage_appendmap.lua	Tue Mar 21 11:17:46 2017 +0100
+++ b/mod_storage_appendmap/mod_storage_appendmap.lua	Tue Mar 21 15:56:43 2017 +0100
@@ -16,8 +16,8 @@
 	if _VERSION == "Lua 5.1" then -- HACK
 		env._ENV = env; -- HACK
 	end -- SO MANY HACKS
-	local chunk, err = load(filename, env);
-	if not chunk then return chunk, err; end
+	local chunk, err, errno = load(filename, env);
+	if not chunk then if errno == 2 then return end return chunk, err; end
 	local ok, err = pcall(chunk);
 	if not ok then return ok, err; end
 	if _VERSION == "Lua 5.1" then -- HACK