Skip to content

Commit

Permalink
Merge pull request #138 from FlTr/path-exists-17
Browse files Browse the repository at this point in the history
path valid if error code 17 by os.rename
  • Loading branch information
skywind3000 authored May 5, 2021
2 parents 8210c56 + a991162 commit a3d4f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion z.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a3d4f5d

Please sign in to comment.