From 34a1bc1a46e66ecb0a4a871fbfa83e8d0d14dc25 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sun, 6 Mar 2016 19:53:55 -0300 Subject: [PATCH] Remove `goto` statement in lua code. `goto` is another luajit extension not compatible with 5.1. --- test/functional/helpers.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 0835981a02..55c97d451b 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -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