Skip to content

Commit 64b08ef

Browse files
authored
Merge pull request #22228 from masterpiga/fix_22160
jobs: do not try to delete duplicate XMP if it does not exist
2 parents 0570a90 + 482c287 commit 64b08ef

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎RELEASE_NOTES.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ changes (where available).
177177

178178
## Bug Fixes
179179

180+
- Fixed a trashing error dialog when deleting a virgin duplicate of an
181+
image while sidecar creation is set to "after edit".
182+
180183
- Fixed color harmonizer's auto-detect harmony applying the hue
181184
histogram of the previously viewed image after switching images in the
182185
darkroom.

‎src/control/jobs/control_jobs.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,10 @@ static _dt_delete_status_t delete_file_from_disk
13691369
{
13701370
_dt_delete_status_t delete_status = _DT_DELETE_STATUS_UNKNOWN;
13711371

1372+
// if the file does not exist on disk, it is already deleted
1373+
if(!g_file_test(filename, G_FILE_TEST_EXISTS))
1374+
return _DT_DELETE_STATUS_DELETED;
1375+
13721376
GFile *gfile = g_file_new_for_path(filename);
13731377
int send_to_trash = dt_conf_get_bool("send_to_trash");
13741378

0 commit comments

Comments
 (0)