Skip to content

Commit

Permalink
explain why we must purge tracks AFTER the batch operation
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Oct 1, 2021
1 parent 0f59bd8 commit 394e338
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/widget/wtrackmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,11 @@ class RemoveTrackFilesFromDiskTrackPointerOperation : public mixxx::TrackPointer
<< "could not be deleted. Track is not purged";
mTracksToKeep.append(location);
} else {
// File doesn't exist or was deleted. Queue for purging.
// File doesn't exist or was deleted.
// Note: we must not purge every single track since TrackDAO::afterPurgingTracks
// would enforce a track model update (select())
// So we add it to the purge queue and purge all tracks at once
// in slotRemoveFromDisk() afterwards.
mTracksToPurge.append(trackRef);
}
}
Expand Down

0 comments on commit 394e338

Please sign in to comment.