Bug 426218 - Pictures from old collection still in database after removing it
Summary: Pictures from old collection still in database after removing it
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Maintenance-Database (show other bugs)
Version: 7.1.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-05 16:57 UTC by MarcP
Modified: 2020-09-19 11:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.2.0
Sentry Crash Report:


Attachments
Screenshot showing the issue (226.35 KB, image/png)
2020-09-05 16:57 UTC, MarcP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2020-09-05 16:57:42 UTC
Created attachment 131437 [details]
Screenshot showing the issue

SUMMARY

As a test, I added a folder with pictures (/home/user/Images) as a new Local collection. It scanned the pictures inside and its metadata. When I was done doing those tests, I went to the settings menu and removed the local collection. 

However, the pictures still appear in my database, and manually cleaning it, or the automatic cleanup on the startup does not delete them or their metadata (tags, dates, etc). I cannot see the pictures, not even their thumbnail (see attachment), but they are still shown as icons

Shouldn't that action be performed immediately? How can I remove them permanently?


STEPS TO REPRODUCE
1. On existing Digikam installation, manually add new Local collection in the settings menu.
2. Wait for digikam to scan the new files and update the database
3. Delete the Local collection from the settings menu.
4. Restart digikam and wait for the startup cleanup to finish. (or, alternatively, Perform Database Cleaning on Tools/Maintenance)

OBSERVED RESULT
Placeholders for the old pictures are still shown, and their tags appear on the tree.


EXPECTED RESULT
Pictures from that collection should have been deleted from the database.


SOFTWARE/OS VERSIONS

I tried it both in the stable 7.0.0 x64 appimage and today's nightly flatpak, both under Ubuntu 20.04LTS with Gnome.
Comment 1 Maik Qualmann 2020-09-05 17:40:12 UTC
Never seen this problem. I've removed a lot of collections.

Maik
Comment 2 MarcP 2020-09-05 19:28:43 UTC
I just replicated it again, with identical results. 

I have three collections on network shares, and I added a local collection (a folder in my home directory). I waited until it finished scanning for new items, and then deleted that local collection. However, the imported items do not disappear, and cleaning the database does nothing.

Do you want me to run some specific tests?
Comment 3 Maik Qualmann 2020-09-05 19:54:49 UTC
Just tested again, no not reproducible. We know that you are manipulating the root path in the DB. Is a sub-path part of the deleted path?

Maik
Comment 4 MarcP 2020-09-05 20:37:24 UTC
Actually, digikam's database is stored at the same path of the Local collection I just added (/home/marc/Imatges). But I have not edited the path in the database manually in this case.
Comment 5 MarcP 2020-09-19 11:01:06 UTC
Hi again. Today I was using the 7.2 beta, and I re-added the problematic collection and removed it, and it finally removed all the associated pictures from my library. I don't know if I was doing something wrong or something was fixed in that version, but I no longer have this problem.

Thanks for your time!
Comment 6 caulier.gilles 2020-09-19 11:05:06 UTC
Thanks for your feedback

Gilles Caulier