improve errno handling in os.path.exists

This commit is contained in:
skywind3000 committed 2019-03-02 12:06:02 +08:00
1 parent f92ad79e2c
commit f63a832921
1 file changed
+1 -1
+1 -1
View File
@@ -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