[prev in list] [next in list] [prev in thread] [next in thread]
List: amarok-bugs-dist
Subject: [amarok] [Bug 411760] Deleting track deletes whole disc
From: "Wolfgang Bauer" <bugzilla_noreply () kde ! org>
Date: 2019-09-20 9:12:45
Message-ID: bug-411760-71684-pmI5e8MouA () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=411760
Wolfgang Bauer <wbauer@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 <wbauer@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 the assignee for the bug.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic