SqlRegistry: fix assert fail in SqlScanResultProcessor by always returning the correct track
What happened: 1. User has 1.mp3, copies it as 1.new.mp3 and edits some tags of 1.new.mp3. Both files do *not* have AFT tag embedded. 2. Amarok registers the new file. 3. Users restarts Amarok (needed to reproduce because of internal state) 4. User renames 1.new.mp3 back to 1.mp3 by overwriting it, Amarok catches it 5. Amarok does not associate new 1.mp3 with the old 1.mp3 because it finds previous 1.new.mp3 entry by uid (file hash) instead. 6. Amarok tries to remove entry for the old 1.mp3, but SqlRegistry::getTrack( int urlId ) erroneously returns the new entry 7. SqlScanResultProcessor correctly asserts out, refusing to delete the incorrect entry. The fix is to enhance SqlRegistry::getTrack( int urlId ) to double-check that it indeed returns the correct entry. BUG: 323156 FIXED-IN: 2.9 CCBUG: 322474 BACKPORT
parent
60b9a347
Please register or sign in to comment