Nil check, to avoid issues for files that don't have filenames yet (new files, etc..) (#169)

This commit is contained in:
Adam 2021-05-01 16:25:39 -04:00 committed by GitHub
parent b69242312d
commit dd604c1336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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