Bug 510276 - Moving folder causes recursive copy
Summary: Moving folder causes recursive copy
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Albums (other bugs)
Version First Reported In: 8.7.0
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-05 19:41 UTC by HubMiner
Modified: 2025-11-07 01:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.8.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HubMiner 2025-10-05 19:41:42 UTC
SUMMARY

Sometimes copying directories across DK collections causes it to create a set of endless subdirectories, each with copies of the same images.  I am not sure how to reproduce this - what triggers this, possibly asking to move a direcoty while something else is in progress (lazy sync).  I observed this behavior multiple times.  


STEPS

Identify a leaf folder with a few image files
Maybe start a lazy sync in the same folder (update a test tag for all images there)
In DK, drag the folder from one collection to another
Observe that "move" status bar is showing this is taking long time
Close and terminate DK
Find the source (not target!) folder localtion.
If the issue was triggered, you would see endless nested directories (100+ levels), each with copies of the files.


RECOVERY

Deletion is successful only with Windows "rmdir" command, GUI based approach does not work.
Comment 1 Maik Qualmann 2025-10-05 19:46:47 UTC
A recursive album move/copy detection is added in digiKam-8.8.0:

https://invent.kde.org/graphics/digikam/-/commit/dcc48cc8711fdb3064050e8871c118243fbd036a

Maik
Comment 2 Maik Qualmann 2025-10-05 20:02:22 UTC
One more tip: you should definitely not move folders to which metadata is currently being written. On the one hand, Windows file locking blocks further actions, and the metadata may not be synchronized because files have been moved. Wait until the actions are complete. We'll never be able to protect each task other.

Maik