Version: 1.4-SVN (using KDE KDE 3.5.1) Installed from: Unlisted Binary Package Compiler: GCC 4.0.2 OS: Linux This was reported by a user in the help forum herehttp://amarok.kde.org/component/option,com_simpleboard/Itemid,57/func,view/id,11019/catid,8/limit,6/limitstart,0/ Essentially, an entry can be added to the list of playlists either by a playlist file, like a .m3u, or by specifying a directory. If the playlist entry represents a directory, if you right-click and choose "delete playlist" the actual directory is removed as well as all the contents. the delete function doesn't seem to be able to differentiate between deleting a playlist file from a dir, so it just 'rm -Rf %1'
<a href="http://amarok.kde.org/component/option,com_simpleboard/Itemid,57/func,view/id,11057/catid,8/limit,6/limitstart,0/">Clickable link</a> for the forum post.
Can't reproduce. If I try to select a directory and press "Open", I get an error dialog: "Please select the file to open."
http://up.drun.net/files/am01.png http://up.drun.net/files/am02.png http://up.drun.net/files/am03.png http://up.drun.net/files/am04.png http://up.drun.net/files/am05.png http://up.drun.net/files/am06.png http://up.drun.net/files/am07.png
I thought so too at first, but if you merely highlight the directory in the file open dialog instead of enter it, you can then add it. Greg
SVN commit 513697 by aoliveira: If user set a dir as a playlist and then remove this playlist, the directory would be deleted, and that's not funny at all. BUG: 122480 M +7 -0 playlistbrowser.cpp --- trunk/extragear/multimedia/amarok/src/playlistbrowser.cpp #513696:513697 @@ -1461,6 +1461,13 @@ if ( button == KMessageBox::Continue ) { // TODO We need to check which files have been deleted successfully + // Avoid deleting dirs. See bug #122480 + for ( KURL::List::iterator it = items.begin(), end = items.end(); it != end; ++it ) { + if ( QFileInfo( (*it).path() ).isDir() ) { + it = items.remove( it ); + continue; + } + } KIO::del( items ); return true; }
SVN commit 513991 by aoliveira: Backporting the fix for 122480 (When deleting playlist that is a directory, the directory and all contents is deleted, not just the playlist entry), as it was a quite serious bug. CCBUG: 122480 M +2 -0 ChangeLog M +8 -1 src/playlistbrowser.cpp --- branches/stable/extragear/multimedia/amarok/ChangeLog #513990:513991 @@ -8,6 +8,8 @@ * Support for libtunepimp 0.4. (BR 94988) BUGFIXES: + * When using a folder as playlist, deleting the playlist would delete + the folder and all files inside it. (BR 122480) * OSD was showing "No track playing" for tracks without metadata. * Smart Playlists with playcount or score related conditions wouldn't match all songs properly. (BR 97046) --- branches/stable/extragear/multimedia/amarok/src/playlistbrowser.cpp #513990:513991 @@ -1009,6 +1009,13 @@ urls.append( (*it)->xmlUrl() ); } // TODO We need to check which files have been deleted successfully + // Avoid deleting dirs. See bug #122480 + for ( KURL::List::iterator it = items.begin(), end = items.end(); it != end; ++it ) { + if ( QFileInfo( (*it).path() ).isDir() ) { + it = items.remove( it ); + continue; + } + } KIO::del( urls ); return true; } @@ -1364,7 +1371,7 @@ else { debug() << "not current!" << endl; - + //Remove any items in Listview that have the same path as this one // Should only happen when overwriting a playlist QListViewItem *item = parent->firstChild();