- add fd to cache immediately
- do not check file presence, the result could be inconsistent with the cache
if (!exif_cache) exif_init_cache();
if (!exif_cache) exif_init_cache();
- if (!fd || !is_readable_file(fd->path)) return NULL;
if (file_cache_get(exif_cache, fd)) return fd->exif;
g_assert(fd->exif == NULL);
if (file_cache_get(exif_cache, fd)) return fd->exif;
g_assert(fd->exif == NULL);
fd->exif = exif_read(fd->path, sidecar_path, fd->modified_xmp);
g_free(sidecar_path);
fd->exif = exif_read(fd->path, sidecar_path, fd->modified_xmp);
g_free(sidecar_path);
+ file_cache_put(exif_cache, fd, 1);
{
if (!fd) return;
g_assert(fd->exif == exif);
{
if (!fd) return;
g_assert(fd->exif == exif);
-
- file_cache_put(exif_cache, fd, 1);
}
/* embedded icc in jpeg */
}
/* embedded icc in jpeg */