https://bugs.kde.org/show_bug.cgi?id=411760
Wolfgang Bauer <wba...@tmo.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit| |https://commits.kde.org/ama | |rok/b986f52d1d53b675a0d21a7 | |507941e368acd3a14 Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #2 from Wolfgang Bauer <wba...@tmo.at> --- Git commit b986f52d1d53b675a0d21a7507941e368acd3a14 by Wolfgang Bauer. Committed on 20/09/2019 at 09:09. Pushed by wbauer into branch 'master'. Don't delete whole folder when deleting a track `SqlCollectionLocation::moodFile()` tries to replace the filename's extension with ".mood" (and prepend a '.') to get the Url of the moodfile. But it does that *after* the filename has already been removed from the Url, so `QUrl::fileName()` gives an empty string and the end result is actually "/path/to/folder/." which depicts the containing folder. As a result, when Amarok tries to delete the corresponding moodfile after a track is deleted, the whole folder gets deleted instead. To fix this, save the filename in a temporary variable before removing it, and use that for generating the new filename. Differential Revision: https://phabricator.kde.org/D24040 M +2 -1 src/core-impl/collections/db/sql/SqlCollectionLocation.cpp https://commits.kde.org/amarok/b986f52d1d53b675a0d21a7507941e368acd3a14 -- You are receiving this mail because: You are watching all bug changes.