diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 459a871b989..1c2f7480772 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -170,6 +170,9 @@ changes (where available). ## Bug Fixes +- Fixed a trashing error dialog when deleting a virgin duplicate of an + image while sidecar creation is set to "after edit". + - Fixed color harmonizer's auto-detect harmony applying the hue histogram of the previously viewed image after switching images in the darkroom. diff --git a/src/control/jobs/control_jobs.c b/src/control/jobs/control_jobs.c index e1b63b38a3a..8bfba558c67 100644 --- a/src/control/jobs/control_jobs.c +++ b/src/control/jobs/control_jobs.c @@ -1369,6 +1369,10 @@ static _dt_delete_status_t delete_file_from_disk { _dt_delete_status_t delete_status = _DT_DELETE_STATUS_UNKNOWN; + // if the file does not exist on disk, it is already deleted + if(!g_file_test(filename, G_FILE_TEST_EXISTS)) + return _DT_DELETE_STATUS_DELETED; + GFile *gfile = g_file_new_for_path(filename); int send_to_trash = dt_conf_get_bool("send_to_trash");