Fix rmdir on non-existing paths

This commit is contained in:
flysand7 2023-07-23 21:28:47 +11:00
parent ea78e5de46
commit 42e9d208fb
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ local compiler_options = args.options or ''
-- Clean the build files if needed -- Clean the build files if needed
function rmdir(p) function rmdir(p)
if not path.exists(p) then
return
end
path.each(path.join(p,"*"), function(P) path.remove(P) end, path.each(path.join(p,"*"), function(P) path.remove(P) end,
{param = "f",delay = true,recurse = true,reverse = true}) {param = "f",delay = true,recurse = true,reverse = true})
path.remove(p) path.remove(p)