--- a/src/luacov/reporter.lua +++ b/src/luacov/reporter.lua @@ -25,7 +25,7 @@ entry=directory.."/"..entry local attr=lfs.attributes(entry) coroutine.yield(entry,attr) - if attr.mode == "directory" then + if attr and attr.mode == "directory" then yieldtree(entry) end end @@ -95,7 +95,7 @@ os.exit(1) end for filename, attr in dirtree("./") do - if attr.mode == "file" and fileMatches(filename, '.%.lua$') then + if attr and attr.mode == "file" and fileMatches(filename, '.%.lua$') then local file_stats = {} file_stats[0] = 0 if luacov.file_included(filename) then