From e9a059b84cac59b164b953efdb6747d105cdb6c4 Mon Sep 17 00:00:00 2001 From: Grump Date: Fri, 8 May 2020 10:16:51 +0200 Subject: [PATCH] allow remove() of non-existent files --- nativefs.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nativefs.lua b/nativefs.lua index 6db26c0..2ea4112 100644 --- a/nativefs.lua +++ b/nativefs.lua @@ -452,6 +452,9 @@ end function nativefs.remove(name) local info = nativefs.getInfo(name) + if not info then + return false, "Could not remove " .. name + end if info.type == 'directory' then if not rmdir(name) then return false, "Could not remove directory " .. name