Bug 184410 - Amarok deleting my files in 'Organize Files'
Summary: Amarok deleting my files in 'Organize Files'
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 2.0.1
Platform: Ubuntu Linux
: HI critical
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-15 16:09 UTC by Andrew Trebble
Modified: 2009-02-17 00:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the 'Organize files' window. (30.08 KB, image/png)
2009-02-15 22:43 UTC, Andrew Trebble
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Trebble 2009-02-15 16:09:14 UTC
Version:           2.0.1 (using KDE 4.1.4)
OS:                Linux
Installed from:    Ubuntu Packages

Hi all.

I ran into a situation where Amarok has deleted my music files.  I see now that it was my own fault but Amarok shouldn't have allowed me to make such a boneheaded move.  Let me explain.

In the collection list, I right clicked on an artist name and selected 'Organize Files'.  It brought up a dialog for me to create the naming scheme.  I clicked on the 'Advanced' button and put in the following string:

%artist/%album/%track - %title.%filetype

I didn't notice that the 'Collection Folder' drop-down was empty so when I clicked 'OK' it moved all my files into the void.  They are gone.  I have run some finds on my hard drive and there is no trace of the files.

I did a test with some songs that I don't mind if they disappear and it works fine if there is something selected in the drop-down.

Correct me if I am wrong but Amarok should not allow you to click OK if that drop-down is empty because it will result in files being forever lost.

Now if you will excuse me I have to re-rip all my Snog CDs now.
Comment 1 FiNeX 2009-02-15 17:44:01 UTC
Can you post a screenshot of the dialog?
Probably in current trunk it has already been fixed.

Thanks
Comment 2 Andrew Trebble 2009-02-15 22:43:30 UTC
Created attachment 31348 [details]
Screenshot of the 'Organize files' window.

A screenshot of the 'Organize files' window. It shows how if I was to click OK, the files would be organized into the root directory.
Comment 3 Andrew Trebble 2009-02-15 22:45:20 UTC
I've uploaded a screenshot.  As you can see the files are being 'organized' into the root directory and since I don't have write access to there, the files just disappear without so much as a warning.
Comment 4 FiNeX 2009-02-15 23:03:31 UTC
Thanks for the quick feedback Andrew, I've reproduced the bug (I've had to use a new clean user and I've not configured the collection folder).

A simple fix could be to disable the "organize" feature if no collection folders are setted.
Comment 5 Seb Ruiz 2009-02-15 23:09:03 UTC
Upgrading priority.
Comment 6 Mark Kretschmann 2009-02-16 07:03:52 UTC
CC'ing Teo (not sure if it's your code, Teo, but maybe you have an idea?. If not maybe NHN or so?)
Comment 7 Teo Mrnjavac 2009-02-16 08:14:43 UTC
SVN commit 926778 by mrnjavac:

Fix a critical issue with files being deleted when OrganizeCollection is run without selecting a collection root.
BUG: 184410


 M  +13 -1     OrganizeCollectionDialog.cpp  
 M  +1 -0      OrganizeCollectionDialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=926778
Comment 8 FiNeX 2009-02-16 09:36:34 UTC
Eventually a dialog box could be provided in order to inform the user that he will need to set at least one collection folder.
Comment 9 Andrew Trebble 2009-02-16 14:35:21 UTC
Thanks you to all involved for fixing this.

One thought I had last night was that this might also occur in 'Copy files to collection' and 'Move files to collection'.  You guys might also want to have a look in there to make sure.

Thanks again.
Andrew.
Comment 10 Teo Mrnjavac 2009-02-16 18:36:58 UTC
It's fixed in the dialog so move/copy to collection should be fine now too.
Comment 11 Dan Meltzer 2009-02-17 00:21:02 UTC
SVN commit 927175 by dmeltzer:

Fix a critical issue with files being deleted when OrganizeCollection is run without selecting a collection root.

Backport of r926778
BUG: 184410

 M  +13 -1     OrganizeCollectionDialog.cpp  
 M  +1 -0      OrganizeCollectionDialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=927175