diff options
Diffstat (limited to 'testing/luacov/reporter_fix.lua.patch')
-rw-r--r-- | testing/luacov/reporter_fix.lua.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/luacov/reporter_fix.lua.patch b/testing/luacov/reporter_fix.lua.patch new file mode 100644 index 00000000000..b97ccd1974e --- /dev/null +++ b/testing/luacov/reporter_fix.lua.patch @@ -0,0 +1,22 @@ +diff --git a/src/luacov/reporter.lua b/src/luacov/reporter.lua +index 0aadce1..d041d10 100644 +--- a/src/luacov/reporter.lua ++++ b/src/luacov/reporter.lua +@@ -33,7 +33,7 @@ local function dirtree(dir) + entry=directory..dir_sep..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 +@@ -130,7 +130,7 @@ function ReporterBase:new(conf) + local function add_empty_dir_coverage_data(directory_path) + + for filename, attr in dirtree(directory_path) do +- if attr.mode == "file" and fileMatches(filename, '.%.lua$') then ++ if attr and attr.mode == "file" and fileMatches(filename, '.%.lua$') then + add_empty_file_coverage_data(filename) + end + end |