This commit is contained in:
zengxiangbin 2017-10-25 16:10:49 +08:00
parent 7b8121b9c8
commit 16c5401b2e

View File

@ -10,11 +10,9 @@ local function isFile(path)
end
local function isDir(path)
local tmp = path.."/"..os.tmpname()
local f = io.open(tmp, "w")
if f then
f:close()
os.remove(tmp)
path = string.gsub(path.."/", "//", "/")
local ok, err, code = os.rename(path, path)
if ok or code == 13 then
return true
end
return false