Skip to content

Commit

Permalink
fix bug where dedup list to IoctlFileDedupeRange would be duplicated …
Browse files Browse the repository at this point in the history
…with garbage

Fixes #10
  • Loading branch information
Jorropo committed May 5, 2024
1 parent 4b440cf commit 2de78a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func dedup(backoff chan struct{}, length uint64, paths ...string) {

filesAreReady.Wait()

valid := dedups[:]
valid := dedups[:0]
for _, d := range dedups {
if d.Dest_fd == 0 {
continue
Expand Down

0 comments on commit 2de78a7

Please sign in to comment.