diff --git a/data/core/common.lua b/data/core/common.lua index 379ca795..7d67484b 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -248,7 +248,7 @@ end function common.path_belongs_to(filename, path) - return string.find(filename, path .. PATHSEP, 1, true) == 1 + return filename and string.find(filename, path .. PATHSEP, 1, true) == 1 end