Remove goto statement in lua code.

`goto` is another luajit extension not compatible with 5.1.
This commit is contained in:
Thiago de Arruda 2016-03-06 19:53:55 -03:00
parent c6ec148f2d
commit 34a1bc1a46

View File

@ -348,15 +348,13 @@ local function rmdir(path)
return nil
end
for file in lfs.dir(path) do
if file == '.' or file == '..' then
goto continue
if file ~= '.' and file ~= '..' then
local ret, err = os.remove(path..'/'..file)
if not ret then
error('os.remove: '..err)
return nil
end
end
local ret, err = os.remove(path..'/'..file)
if not ret then
error('os.remove: '..err)
return nil
end
::continue::
end
local ret, err = os.remove(path)
if not ret then