From 6a15f233af5665658cc0540d5486a93ffd73d221 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Thu, 18 Jan 2024 21:55:19 +0100 Subject: [PATCH] Re-add else condition --- internal/torrent/repair.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/torrent/repair.go b/internal/torrent/repair.go index a85c694..9720e83 100644 --- a/internal/torrent/repair.go +++ b/internal/torrent/repair.go @@ -224,8 +224,7 @@ func (t *TorrentManager) repair(torrent *Torrent) { info, err := t.redownloadTorrent(torrent, "") if err != nil { t.log.Warnf("Cannot repair torrent %s", t.GetKey(torrent)) - } - if info.Progress != 100 || (info.Progress == 100 && !t.isStillBroken(info, brokenFiles)) { + } else if info.Progress != 100 || (info.Progress == 100 && !t.isStillBroken(info, brokenFiles)) { t.log.Infof("Successfully repaired torrent %s", t.GetKey(torrent)) return }