diff options
Diffstat (limited to 'src/tree/tree.rs')
-rw-r--r-- | src/tree/tree.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tree/tree.rs b/src/tree/tree.rs index 00f371b..465e9cf 100644 --- a/src/tree/tree.rs +++ b/src/tree/tree.rs @@ -328,8 +328,11 @@ impl Tree { /// long computation which is needed for directories) pub fn fetch_regular_file_sums(&mut self) { for i in 1..self.lines.len() { - if self.lines[i].is_file() { - self.lines[i].sum = Some(FileSum::from_file(&self.lines[i].path)); + match self.lines[i].line_type { + TreeLineType::Dir | TreeLineType::Pruning => {} + _ => { + self.lines[i].sum = Some(FileSum::from_file(&self.lines[i].path)); + }, } } self.sort_siblings(); |