Revision b0121db...
Go back to digest for 10th November 2013Bug Fixes in Multimedia
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.
FIXED-IN: 2.9
BACKPORT
File Changes
- ChangeLog
- src/core-impl/collections/db/sql/SqlRegistry.cpp