From f560b7f428b7dd6b0f86e049f5c3cae6cb4715c5 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Sun, 13 Oct 2024 22:18:51 -0700 Subject: [PATCH] Fix loading empty hashes --- cmd/comic-hasher/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/comic-hasher/main.go b/cmd/comic-hasher/main.go index f88d7a0..8b8044f 100644 --- a/cmd/comic-hasher/main.go +++ b/cmd/comic-hasher/main.go @@ -552,8 +552,8 @@ func (s *Server) DecodeHashes(format Format, hashes []byte) error { } loadedHashes := ch.SavedHashes{} err := decoder(hashes, &loadedHashes) - if err != nil || len(loadedHashes.IDs) == 0 { - fmt.Println("Failed to load hashes, checking if they are old hashes", err) + if err != nil { + fmt.Println("Failed to load hashes, checking if they are old hashes", format, ":", err) oldHashes := make(ch.OldSavedHashes) if err = decoder(hashes, &oldHashes); err != nil { return err