Version: 1.3.5 (using KDE KDE 3.4.2) Installed from: SuSE RPMs OS: Linux If a directory with hidden subdirectories (dot as a prefix: .trash) is set in the collection preferences, amaroK scans through them. This includes the trash bin. It is expected that amaroK doesn't include the trash bin. The media player shouldn't include hidden directories in the collection.
are you sure it does that? I've specifically added code in 1.3.4 to prevent it recursing into hidden subdirectories. where did you get the package from? rpm -q --changelog amarok | head please
Excuse me, I compiled amaroK 1.3.5 by myself. Configuration: $ ./configure --prefix=/opt/kde3/ --enable-mysql --without-arts --without-opengl --without-libvisual --with-helix --with-mas
I am using amarok 1.3.6 from Debian, which I backported myself from sid to sarge under KDE 3.4.2. I also find that amarok scans dot-dirs from KDE and Gnome, so that I get three copies of almost all media files in the collection. I can come up with the build options and versions if it would help.
SVN commit 486194 by mueller: fix collection recursion BUG: 115478 M +1 -1 collectionreader.cpp --- branches/stable/extragear/multimedia/amarok/src/collectionreader.cpp #486193:486194 @@ -231,7 +231,7 @@ if ( S_ISDIR( statBuf.st_mode ) && m_recursively && entry.length() && entry[0] != '.' ) { - const QString file = QFile::decodeName( entry ); + const QString file = dir + QFile::decodeName( entry ); if( !m_incremental || !CollectionDB::instance()->isDirInCollection( file ) ) // we MUST add a '/' after the dirname
Patch works well on 1.3.6 too, thankyou for the very quick fix!
Sorry I spoke too soon, this has introduced a new problem. There is now no recursive scanning of collections, only the top directory. I've done an strace, attached, and it seems that the collection dirname is being doubly appended.
Created attachment 13815 [details] strace of collection scanning process I only included lines 40,000 to 41,600 of strace in the interests of space and privacy, but it shows the important part. The first directory is statted at line 101, the second at line 542. You can see that each S_IFDIR entry is statted again but with the collection dir doubly prefixed to the filename. I guess this is why directories aren't recursed into.
ok, reverted.
What's up with this report, I thought this was fixed?
I can not reproduce the issue so far, so a bit more information would be useful.. which directories do you list for scanning? and where does it start recursing into dot directories? strace might help
The bug is clearly reproducable with Amarok 1.4b2 (using Debian experimental packages). I used the following steps to reproduce it: 1. created the following directory structure: + testfolder + .hidden + somefile.ogg 2. I now used the assistent to add "testfolder" to my music collection. In the assistent, the subfolder ".hidden" is not shown. My amarokrc now looks like: Collection Folders=/home/eckhart/Musik,/home/eckhart/testfolder 3. On rescanning, somefile.ogg appears in my collection (clearly identified by it's meta information).
SVN commit 529214 by rolandg: Skip hidden directories while scanning the collection BUG: 115478 M +1 -0 ChangeLog M +2 -1 src/collectionreader.cpp --- branches/stable/extragear/multimedia/amarok/ChangeLog #529213:529214 @@ -8,6 +8,7 @@ * Support for libtunepimp 0.4. (BR 94988) BUGFIXES: + * Skip hidden directories while scanning the collection. (BR115478) * Fix leak of file descriptors with embedded cover art. Patch by Shane King <kde@dontletsstart.com>. (BR 123472) * Stop collection folders being automatically removed. Instead, allow --- branches/stable/extragear/multimedia/amarok/src/collectionreader.cpp #529213:529214 @@ -218,6 +218,7 @@ for( dirent *ent; (ent = readdir( d )) && !isAborted(); ) { QCString entry (ent->d_name); + QCString entryname (ent->d_name); if ( entry == "." || entry == ".." ) continue; @@ -231,7 +232,7 @@ if ( ! ( S_ISDIR( statBuf.st_mode ) || S_ISREG( statBuf.st_mode ) ) ) continue; - if ( S_ISDIR( statBuf.st_mode ) && m_recursively && entry.length() && entry[0] != '.' ) + if ( S_ISDIR( statBuf.st_mode ) && m_recursively && entry.length() && entryname[0] != '.' ) { const QString file = QFile::decodeName( entry );
SVN commit 529216 by rolandg: Skip hidden directories while scanning the collection CCBUG: 115478 M +1 -0 ChangeLog M +2 -1 src/collectionscanner/collectionscanner.cpp --- trunk/extragear/multimedia/amarok/ChangeLog #529215:529216 @@ -9,6 +9,7 @@ CHANGES: BUGFIXES: + * Skip hidden directories while scanning the collection. (BR115478) * Instead of cancelling collection organiziation operations when starting new one append to running one. * Correctly show & in playlist 'Burn' right-click submenu. Patch by --- trunk/extragear/multimedia/amarok/src/collectionscanner/collectionscanner.cpp #529215:529216 @@ -201,6 +201,7 @@ for( dirent *ent; ( ent = readdir( d ) ); ) { QCString entry (ent->d_name); + QCString entryname (ent->d_name); if ( entry == "." || entry == ".." ) continue; @@ -214,7 +215,7 @@ if ( ! ( S_ISDIR( statBuf.st_mode ) || S_ISREG( statBuf.st_mode ) ) ) continue; - if ( S_ISDIR( statBuf.st_mode ) && m_recursively && entry.length() && entry[0] != '.' ) + if ( S_ISDIR( statBuf.st_mode ) && m_recursively && entry.length() && entryname[0] != '.' ) { const QString file = QFile::decodeName( entry );
This causes albums that start with a dot to be omitted from the collection.
You coulde use Amarok's 'organize collection' feature: it will move the artist '...And you will know us by the trail of dead' to the directory 'And you will know us by the trail of dead' and thereby solve your problems.