From 92afc9d8f0711739a49ddf2752f56c1613767f6f Mon Sep 17 00:00:00 2001 From: Imple Lee <80144331+ImpleLee@users.noreply.github.com> Date: Fri, 19 Mar 2021 18:23:31 +0800 Subject: [PATCH] remove a `goto` --- main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.lua b/main.lua index 43593eb3..2c021e68 100644 --- a/main.lua +++ b/main.lua @@ -38,12 +38,12 @@ love.mouse.setVisible(false) --Create directories for _,v in next,{"conf","record","replay"}do local info=fs.getInfo(v) - if info then - if info.type=="directory"then goto NEXT end + if not info then + fs.createDirectory(v) + elseif info.type ~= 'directory' then fs.remove(v) + fs.createDirectory(v) end - fs.createDirectory(v) - ::NEXT:: end --Delete some useless files