Bug 516516 - Bug 510691 - addition: Photos get deleted!
Summary: Bug 510691 - addition: Photos get deleted!
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-file (other bugs)
Version First Reported In: 8.8.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-22 11:24 UTC by Bertil Rolf
Modified: 2026-02-22 18:14 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bertil Rolf 2026-02-22 11:24:48 UTC
Bug in Digikam 8.8.0 (Kubuntu) - Photos get deleted!

I previously reported on a naming bug [Bug 510691].

The effects of this bug are very bad. As a consequence, it deleted a dozen of photo files for me. It is NOT a windows problem but concerns Linux as well.

You may want to prioritize this bug.

The process was as follows. 

1) I had named a sequence of photos Q2 2024 XXXX 001 …… 015
2) Then I discovered another photo that I really wanted first in the sequence. So I renamed it Q2 2024 XXX 001 and then wanted to rename all the 16 photos from 001….016, using F2.
3) I get warning msg and went for “overwrite”, which I assumed only concerned file names, not the files themselves. So I chose that.
4) Poof - and a dozen files were gone from my HD. Luckily, I had originals elsewhere and could easily replace the missing photos.

Best regards
Bertil Rolf

PS: An undo function would be nice to have!
Comment 1 Maik Qualmann 2026-02-22 12:07:33 UTC
It's clear that such a renaming process leads to file conflicts. When I do something like this, I increment the counter in the first step, from ### to ####. In the next renaming step, I revert back from #### to ###.

Even if we were to perform a two-step renaming process—first creating unique temporary filenames and then applying the desired filename in the second step—conflicts could still arise due to duplicate files already present in the directory.

I will disable the overwrite function for renaming.

Maik
Comment 2 Maik Qualmann 2026-02-22 12:26:02 UTC
It should be obvious that overwriting files will erase existing ones.

However, we'll move the files to the Trash. The Trash has an undo function, and the "lost" files can all be restored at once (they will have "_vx" appended to their filenames).

Maik
Comment 3 Maik Qualmann 2026-02-22 17:50:49 UTC
Git commit 72bc514ef5b8aa1924f5283ff26dd44eee9c3b0f by Maik Qualmann.
Committed on 22/02/2026 at 17:49.
Pushed by mqualmann into branch 'master'.

try to rename failed items in reverse order
Related: bug 510691
FIXED-IN: 9.0.0

M  +2    -2    NEWS
M  +13   -0    core/utilities/advancedrename/advancedrenameprocessdialog.cpp

https://invent.kde.org/graphics/digikam/-/commit/72bc514ef5b8aa1924f5283ff26dd44eee9c3b0f