[tepl] MetadataStore: call g_file_info_dup() in set_metadata_for_location()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] MetadataStore: call g_file_info_dup() in set_metadata_for_location()
- Date: Sat, 18 Apr 2020 17:19:06 +0000 (UTC)
commit 544bf362c905d16f919c4a553bb28f8a00c6627f
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Apr 16 05:41:47 2020 +0200
MetadataStore: call g_file_info_dup() in set_metadata_for_location()
It's safer that way, so that the internal GFileInfo stored in the hash
table stays internal (cannot be modified externally after-the-fact).
tepl/tepl-metadata-store.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tepl/tepl-metadata-store.c b/tepl/tepl-metadata-store.c
index 4d43437..5487ce5 100644
--- a/tepl/tepl-metadata-store.c
+++ b/tepl/tepl-metadata-store.c
@@ -1073,7 +1073,7 @@ _tepl_metadata_store_set_metadata_for_location (TeplMetadataStore *store,
document_metadata = document_metadata_new ();
document_metadata_set_current_atime (document_metadata);
- document_metadata->entries = g_object_ref (metadata);
+ document_metadata->entries = g_file_info_dup (metadata);
g_hash_table_replace (store->priv->hash_table,
g_object_ref (location),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]