Fix directory iteration issues
This commit is contained in:
@@ -281,7 +281,7 @@ func (t *TorrentManager) repair(torrent *Torrent, wg *sync.WaitGroup) {
|
||||
totalBatches := int(math.Ceil(float64(len(brokenFiles)) / 100))
|
||||
t.repairLog.Infof("Torrent %s will be repaired by downloading %d batches of the %d broken files", t.GetKey(torrent), totalBatches, len(brokenFiles))
|
||||
|
||||
newlyDownloadedIds := make([]string, 0)
|
||||
newlyDownloadedIds := []string{}
|
||||
batchNum := 1
|
||||
brokenFileIDs := getFileIDs(brokenFiles)
|
||||
var group []string
|
||||
@@ -300,7 +300,7 @@ func (t *TorrentManager) repair(torrent *Torrent, wg *sync.WaitGroup) {
|
||||
return
|
||||
}
|
||||
newlyDownloadedIds = append(newlyDownloadedIds, redownloadedInfo.ID)
|
||||
group = make([]string, 0)
|
||||
group = []string{}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user