Bug 314348 - Organize collection folder deletion going 'too far'
Summary: Organize collection folder deletion going 'too far'
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Organize Files Dialog (show other bugs)
Version: 2.7-git
Platform: Debian unstable Linux
: NOR critical
Target Milestone: 2.8
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-03 12:45 UTC by Thierry Göckel
Modified: 2013-02-03 19:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.8


Attachments
screenshot of organize collection showing an invalid path for a file. (120.34 KB, image/png)
2013-02-03 13:24 UTC, Thierry Göckel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Göckel 2013-02-03 12:45:27 UTC
Removing dirs after organizing goes too far up the dir tree.

Cheers

Reproducible: Always

Steps to Reproduce:
1.Organize some album so that an empty dir should be removed afterwards (e.g. /mnt/music/v/various artists/year/album)
2.
3.
Actual Results:  
Not only the empty dir is removed but also all dirs 3 levels up. (e.g. /mnt/music/v)

Expected Results:  
empty dir removed, everything else untouched.

If you need more info (log, etc.) I'll try and reproduce...
Comment 1 Myriam Schweingruber 2013-02-03 13:04:31 UTC
We need a konsole output started with 'amarok -d -nofork' when this happens.
Comment 2 Thierry Göckel 2013-02-03 13:12:32 UTC
Before I do that, I think I found something interesting:
http://i.imgur.com/JS5I943.png
Why does it think that first file _is_ /mnt/music/V/ ? It must have tried (and succeeded) to delete that file afterwards.
Comment 3 Thierry Göckel 2013-02-03 13:24:22 UTC
Created attachment 76879 [details]
screenshot of organize collection showing an invalid path for a file.
Comment 4 Thierry Göckel 2013-02-03 14:27:12 UTC
Doing a full rescan of my collection didn't help fixing those invalid paths. What I noticed, however, are duplicates which quite often have those invalid paths. The invalid path to that file in the screenshot was also a file that existed twice. Perhaps this report should be closed and a new one opened.

Thanks
Comment 5 Ralf Engels 2013-02-03 15:49:52 UTC
As a work-around I can try to exclude tracks with no valid filepath.
Comment 6 Ralf Engels 2013-02-03 19:12:29 UTC
Git commit f6d38898e0cfbe41c3a03d95e31ad7072b9430ad by Ralf Engels.
Committed on 03/02/2013 at 19:58.
Pushed by rengels into branch 'master'.

Fix Organize collection folder deletion going 'too far'
FIXED-IN: 2.8

M  +11   -3    src/core-impl/collections/db/sql/SqlCollectionLocation.cpp
M  +1    -1    src/core/collections/CollectionLocation.cpp

http://commits.kde.org/amarok/f6d38898e0cfbe41c3a03d95e31ad7072b9430ad