[evince/wip/chpe/xmp: 1/9] pdf: Fix metadata parsing precedence
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/chpe/xmp: 1/9] pdf: Fix metadata parsing precedence
- Date: Sat, 4 Dec 2021 00:06:34 +0000 (UTC)
commit 9aef3c8eed1a352af2b91143fbde1721fe42721b
Author: Christian Persch <chpe src gnome org>
Date: Sat Dec 4 01:06:21 2021 +0100
pdf: Fix metadata parsing precedence
Set the creation and modified datetime from the document in the info
first before parsing the metadata, since the metadata parsing needs to
compare the metadata datetime to decide which info takes precedence.
Fixes a slight regression from commit
1e0a3efa24a4db67fc5b8f0939444d69771be196.
backend/pdf/ev-poppler.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.c b/backend/pdf/ev-poppler.c
index 8dc9035e1..8b3b7a5d7 100644
--- a/backend/pdf/ev-poppler.c
+++ b/backend/pdf/ev-poppler.c
@@ -1060,6 +1060,9 @@ pdf_document_get_info (EvDocument *document)
"metadata", &metadata,
NULL);
+ ev_document_info_take_created_datetime (info, created_datetime);
+ ev_document_info_take_modified_datetime (info, modified_datetime);
+
if (metadata != NULL) {
pdf_document_parse_metadata (metadata, info);
g_free (metadata);
@@ -1174,9 +1177,6 @@ pdf_document_get_info (EvDocument *document)
info->contains_js = EV_DOCUMENT_CONTAINS_JS_UNKNOWN;
#endif
- ev_document_info_take_created_datetime (info, created_datetime);
- ev_document_info_take_modified_datetime (info, modified_datetime);
-
return info;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]