Skip to content

Commit

Permalink
Count bad filename errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rkfg committed Sep 3, 2020
1 parent e6c062a commit 880d420
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fsck.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func fsck(fix bool) error {
}
return nil
})
errors += len(lostFiles)
errors += len(lostFiles) + len(badFiles)
if fix && len(lostFiles) > 0 {
pass("recovering lost files")
lftag := path.Join(mountpoint, "tags", "lost+found")
Expand Down Expand Up @@ -161,6 +161,8 @@ func fsck(fix bool) error {
for _, itemID := range badFiles {
if err := fixFilename(itemID); err != nil {
log.Println(err)
} else {
fixed++
}
}
}
Expand Down

0 comments on commit 880d420

Please sign in to comment.