Fix gosec's G601

This commit is contained in:
Deluan
2020-05-13 15:32:42 -04:00
parent 162971f7b3
commit 5ce3135f00
6 changed files with 22 additions and 11 deletions
+2 -1
View File
@@ -183,7 +183,8 @@ func (s *TagScanner) processChangedDir(ctx context.Context, dir string, updatedA
// If track from folder is newer than the one in DB, update/insert in DB and delete from the current tracks
log.Trace("Updating mediaFiles in DB", "dir", dir, "files", filesToUpdate, "numFiles", len(filesToUpdate))
for _, n := range newTracks {
for i := range newTracks {
n := newTracks[i]
err := s.ds.MediaFile(ctx).Put(&n)
updatedArtists[n.AlbumArtistID] = true
updatedAlbums[n.AlbumID] = true