[Digikam-devel] [digikam] [Bug 277619] SETUP : Exclude folder/subfolder/image from database

Amilcar Lucas amilcar.lucas at gmail.com
Tue Sep 16 22:43:43 BST 2014


Hi,

I got a small 3 line patch that sould fix this issue, but it does not 
seam to work.
And I do not know why.

My image collection takes 30 minutes to load, and it crashes without a 
stack trace on end so I can not fully test this.

Can someone see if it at least it is a step in the right direction ???


   diff --git a/libs/database/collectionscanner.cpp 
b/libs/database/collectionscanner.cpp
   index ce2c923..a599756 100644
   --- a/libs/database/collectionscanner.cpp
   +++ b/libs/database/collectionscanner.cpp
   @@ -880,7 +880,7 @@ void CollectionScanner::scanForStaleAlbums(const 
QList<int>& locationIdsToScan)
            {
                QFileInfo fileInfo(location.albumRootPath() + 
(*it).relativePath);

   -            if (!fileInfo.exists() || !fileInfo.isDir())
   +            if (!fileInfo.exists() || !fileInfo.isDir() || 
fileInfo.fileName() == "@eaDir")
                {
                    toBeDeleted << (*it).id;
                    d->scannedAlbums << (*it).id;
   @@ -932,7 +932,7 @@ void CollectionScanner::scanForStaleAlbums(const 
QList<int>& locationIdsToScan)
                    {
                        QFileInfo fileInfo(location.albumRootPath() + 
it.key().relativePath);

   -                    if (fileInfo.exists() && fileInfo.isDir())
   +                    if (fileInfo.exists() && fileInfo.isDir() && 
fileInfo.fileName() != "@eaDir")
                        {
                            // Just set a new root/relativePath to the 
album. Further scanning will care for all cases or error.
DatabaseAccess().db()->renameAlbum(it.value().albumId, 
it.key().albumRootId, it.key().relativePath);
   @@ -1098,6 +1098,8 @@ void CollectionScanner::scanAlbum(const 
CollectionLocation& location, const QStr
            }
            else if ( fi->isDir() )
            {
   +            if (fi->fileName() == "@eaDir") continue;
   +

Regards,
Amilcar




More information about the Digikam-devel mailing list