Changeset

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
parents 2634:71ce798c86cc
children 2636:9ed6d44b9fed
files mod_storage_appendmap/mod_storage_appendmap.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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