Nil check, to avoid issues for files that don't have filenames yet (new files, etc..) (#169)
This commit is contained in:
parent
b69242312d
commit
dd604c1336
|
@ -248,7 +248,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
function common.path_belongs_to(filename, path)
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue