Skip to content

Commit

Permalink
Image cache: call control save to XMP after releasing
Browse files Browse the repository at this point in the history
Avoid blocking the UI completely
  • Loading branch information
aurelienpierre committed Jan 20, 2025
1 parent d026709 commit 9058542
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/image_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,16 @@ void dt_image_cache_write_release(dt_image_cache_t *cache, dt_image_t *img, dt_i
const int rc = sqlite3_step(stmt);
if(rc != SQLITE_DONE) fprintf(stderr, "[image_cache_write_release] sqlite3 error %d\n", rc);
sqlite3_finalize(stmt);
dt_cache_release(&cache->cache, img->cache_entry);

// TODO: make this work in relaxed mode, too.
// TODO: protect XMP saving from concurrent accesses to DB history
if(mode == DT_IMAGE_CACHE_SAFE)
{
// rest about sidecars:
// also synch dttags file:
dt_control_save_xmp(img->id);
}
dt_cache_release(&cache->cache, img->cache_entry);
}


Expand Down

0 comments on commit 9058542

Please sign in to comment.