Am Sonntag, 8. Januar 2017, 22:22:54 CET schrieb Thomas Werzmirzowsky:
> Hello everybody,

Hi.

> first of all I'd like to thank you for your great work on darktable. I
> really like using it :-)
> 
> Some time ago I noticed a behaviour according to the "delete"
> functionality which I'd consider a bug and wanted to inform you about that.
> 
> In the case that the deleted image is a "original" image the source file
> including the xmp file is deleted as expected. But if I delete a duplicate
> nothing gets deleted from the disk (I'd expect the xmp file to be
> deleted). This causes the duplicate image to reappear if I should ever
> reimport
> the directory. That's not critical but quite annoying.
> 
> I did some debugging in the source code of 2.2.1 and got that far:
> - dt_control_delete_images_job_run in control_jobs.c gets called correctly
> - the else-block with the comment "// don't remove the actual source
> data if there are further duplicates using it;" is entered correctly
> - delete_file_from_disk is called with the correct path (filename of
> duplicate xmp file)
> - within delete_file_from_disk send_to_trash is false
> - created gfile instance points to the right file (duplicate xmp file)
> - g_file_delete returns true although the file doesn't really get
> deleted from the disk
> 
> Would be great if anybody could have a further look at that and if my
> debugging was helpful :-)

Thanks a lot for reporting and digging into it. Should be fixed now. The reason 
was that we deleted the files first and only then removed them from the 
database. However, when removing images from the db we rewrite the sidecar to 
make sure that the latest data is saved on disk. So the delete operation did 
indeed succeed, but immediately afterwards the file was brought back.

> Thanks a lot and best regards
> Thomas

Tobias

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to