diff options
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 14 |
1 files 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 - end - local ret, err = os.remove(path..'/'..file) - if not ret then - error('os.remove: '..err) - return nil + if file ~= '.' and file ~= '..' then + local ret, err = os.remove(path..'/'..file) + if not ret then + error('os.remove: '..err) + return nil + end end - ::continue:: end local ret, err = os.remove(path) if not ret then |