backend/hasher: add verify and readonly DB modes by abhishek593 · Pull Request #9307 · rclone/rclone
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When getHash returns a non-nil error (e.g. DB corruption, not just "no hash found"), the error is silently swallowed here and verification is skipped entirely. This undermines the safety guarantee of verify mode - a corrupted DB entry would cause the download to proceed unverified.
At minimum, consider logging the error. Or better, treat a DB read error in verify mode as a verification failure.