diff --git a/nativefs.lua b/nativefs.lua index 16e7ca9..1a3739b 100644 --- a/nativefs.lua +++ b/nativefs.lua @@ -351,6 +351,9 @@ local function withTempMount(dir, fn, ...) end function nativefs.getDirectoryItems(dir) + if type(dir) ~= "string" then + error("bad argument #1 to 'getDirectoryItems' (string expected, got " .. type(dir) .. ")") + end local result, err = withTempMount(dir, love.filesystem.getDirectoryItems) return result or {} end