1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-14 11:49:48 +00:00

Merge pull request #138 from FlTr/path-exists-17

path valid if error code 17 by os.rename
This commit is contained in:
Linwei
2021-05-05 16:41:06 +08:00
committed by GitHub

2
z.lua
View File

@@ -580,7 +580,7 @@ function os.path.exists(name)
end
local ok, err, code = os.rename(name, name)
if not ok then
if code == 13 then
if code == 13 or code == 17 then
return true
elseif code == 30 then
local f = io.open(name,"r")