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

Gilles Caulier caulier.gilles at gmail.com
Tue Sep 16 22:48:30 BST 2014


Lucas,

This file have been closed as duplicate of

https://bugs.kde.org/show_bug.cgi?id=123097

Please

- Attach your patch to this report.
- Explain exactly what you want to do with "@eaDir" pattern.
- run digiKam under GDB to get a suitable backtrace.

Best

Gilles Caulier

2014-09-16 23:43 GMT+02:00 Amilcar Lucas <amilcar.lucas at gmail.com>:
> 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
>
>
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel



More information about the Digikam-devel mailing list