From f63a8329214d3375f8ecfdc9a4bf21e11a7fa672 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Sat, 2 Mar 2019 12:06:02 +0800 Subject: [PATCH] improve errno handling in os.path.exists --- z.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z.lua b/z.lua index 6a4e2a0..327eb89 100755 --- a/z.lua +++ b/z.lua @@ -454,7 +454,7 @@ function os.path.exists(name) elseif name:sub(-1) == '/' and code == 20 and (not windows) then local test = name .. '.' ok, err, code = os.rename(test, test) - if code == 16 or code == 13 then + if code == 16 or code == 13 or code == 22 then return true end end