mirror of
https://github.com/EngineerSmith/nativefs.git
synced 2025-11-08 23:15:02 +00:00
allow remove() of non-existent files
This commit is contained in:
@@ -452,6 +452,9 @@ end
|
|||||||
|
|
||||||
function nativefs.remove(name)
|
function nativefs.remove(name)
|
||||||
local info = nativefs.getInfo(name)
|
local info = nativefs.getInfo(name)
|
||||||
|
if not info then
|
||||||
|
return false, "Could not remove " .. name
|
||||||
|
end
|
||||||
if info.type == 'directory' then
|
if info.type == 'directory' then
|
||||||
if not rmdir(name) then
|
if not rmdir(name) then
|
||||||
return false, "Could not remove directory " .. name
|
return false, "Could not remove directory " .. name
|
||||||
|
|||||||
Reference in New Issue
Block a user