[tracker-miners/wip/carlosg/speed-track: 14/22] libtracker-miner: Cache GFileInfos from crawler longer
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/speed-track: 14/22] libtracker-miner: Cache GFileInfos from crawler longer
- Date: Thu, 22 Oct 2020 14:45:56 +0000 (UTC)
commit c22fdf1f3e41764fb283e5545ebeaefeb698c430
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Oct 17 14:36:23 2020 +0200
libtracker-miner: Cache GFileInfos from crawler longer
These are stored as GObject data on the GFile, but detached early
on. Keep these tied to the file indefinitely, so they can be used
at later stages in indexing, they will be useful later on.
src/libtracker-miner/tracker-crawler.c | 2 +-
src/libtracker-miner/tracker-file-notifier.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-miner/tracker-crawler.c
index 1a89254e6..7588dc952 100644
--- a/src/libtracker-miner/tracker-crawler.c
+++ b/src/libtracker-miner/tracker-crawler.c
@@ -993,6 +993,6 @@ tracker_crawler_get_file_info (TrackerCrawler *crawler,
g_return_val_if_fail (TRACKER_IS_CRAWLER (crawler), NULL);
g_return_val_if_fail (G_IS_FILE (file), NULL);
- info = g_object_steal_qdata (G_OBJECT (file), file_info_quark);
+ info = g_object_get_qdata (G_OBJECT (file), file_info_quark);
return info;
}
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index aeee44430..3cfe269df 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -419,7 +419,6 @@ file_notifier_add_node_foreach (GNode *node,
file_type = g_file_info_get_file_type (file_info);
_time = g_file_info_get_attribute_uint64 (file_info,
G_FILE_ATTRIBUTE_TIME_MODIFIED);
- g_object_unref (file_info);
_insert_disk_info (notifier,
file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]