Mercurial > geeqie.yaz
comparison src/metadata.c @ 1667:ece97f3f2305
fixes for a built without Exiv2
don't try to access XMP metadata if not compiled with Exiv2
some metadata options are valid without Exiv2, do not disable them
author | nadvornik |
---|---|
date | Tue, 30 Jun 2009 20:12:28 +0000 |
parents | f7183cf53efa |
children | 9e168ba1b0b9 |
comparison
equal
deleted
inserted
replaced
1666:de25b265ab64 | 1667:ece97f3f2305 |
---|---|
457 metadata_pathl = path_from_utf8(metadata_path); | 457 metadata_pathl = path_from_utf8(metadata_path); |
458 unlink(metadata_pathl); | 458 unlink(metadata_pathl); |
459 g_free(metadata_pathl); | 459 g_free(metadata_pathl); |
460 g_free(metadata_path); | 460 g_free(metadata_path); |
461 } | 461 } |
462 | |
463 #ifdef HAVE_EXIV2 | |
464 /* without exiv2: do not delete xmp metadata because we are not able to convert it, | |
465 just ignore it */ | |
462 metadata_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path); | 466 metadata_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path); |
463 if (metadata_path && (!except || strcmp(metadata_path, except) != 0)) | 467 if (metadata_path && (!except || strcmp(metadata_path, except) != 0)) |
464 { | 468 { |
465 metadata_pathl = path_from_utf8(metadata_path); | 469 metadata_pathl = path_from_utf8(metadata_path); |
466 unlink(metadata_pathl); | 470 unlink(metadata_pathl); |
467 g_free(metadata_pathl); | 471 g_free(metadata_pathl); |
468 g_free(metadata_path); | 472 g_free(metadata_path); |
469 } | 473 } |
474 #endif | |
470 } | 475 } |
471 | 476 |
472 static gboolean metadata_legacy_read(FileData *fd, GList **keywords, gchar **comment) | 477 static gboolean metadata_legacy_read(FileData *fd, GList **keywords, gchar **comment) |
473 { | 478 { |
474 gchar *metadata_path; | 479 gchar *metadata_path; |