From dd604c1336712c9ca8e7006dd33115ba705424c3 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 1 May 2021 16:25:39 -0400 Subject: [PATCH] Nil check, to avoid issues for files that don't have filenames yet (new files, etc..) (#169) --- data/core/common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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