Fix runner counting files as directories

This commit is contained in:
Joscha 2023-08-17 19:28:49 +02:00
parent 4478981946
commit 2d255f2e06

View file

@ -85,7 +85,7 @@ fn count(path: &Path) -> somehow::Result<Counts> {
*counts.lines_by_ext.entry(ext.clone()).or_default() += lines; *counts.lines_by_ext.entry(ext.clone()).or_default() += lines;
*counts.todos_by_ext.entry(ext.clone()).or_default() += todos; *counts.todos_by_ext.entry(ext.clone()).or_default() += todos;
for ancestor in relative_path.ancestors() { for ancestor in relative_path.ancestors().skip(1) {
let ancestor = ancestor.to_string_lossy(); let ancestor = ancestor.to_string_lossy();
if ancestor.is_empty() { if ancestor.is_empty() {
continue; continue;