From 2d255f2e06dc72a1b8e5261ddd18853fb418037d Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 17 Aug 2023 19:28:49 +0200 Subject: [PATCH] Fix runner counting files as directories --- src/worker/run/internal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/run/internal.rs b/src/worker/run/internal.rs index ee8ab51..2e58ee0 100644 --- a/src/worker/run/internal.rs +++ b/src/worker/run/internal.rs @@ -85,7 +85,7 @@ fn count(path: &Path) -> somehow::Result { *counts.lines_by_ext.entry(ext.clone()).or_default() += lines; *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(); if ancestor.is_empty() { continue;