Skip to content

Commit 12fa7c7

Browse files
committed
fix: algorithm
1 parent 5c8b069 commit 12fa7c7

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/hook/record_hardlink.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ impl<'a, Size: Eq + Debug> Hook<Size> for RecordHardLink<'a, Size> {
3636
);
3737
paths.push(path.to_path_buf());
3838
})
39-
.or_insert_with(|| (size, Vec::new()));
39+
.or_insert_with(|| (size, vec![path.to_path_buf()]));
4040
}
4141
}

tests/deduplicate_hardlinks.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ fn deduplicate_multiple_hardlinks_to_a_single_file() {
4747
let expected_size = workspace
4848
.join("file.txt")
4949
.pipe_as_ref(read_apparent_size)
50-
.mul(2) // TODO: fix the algorithm and remove this line
5150
.add(read_apparent_size(&workspace))
5251
.pipe(Bytes::new);
5352

0 commit comments

Comments
 (0)