Commit 4bf562b3 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Avoid storing mtime on when querying the iri ad-hoc

Retrieve only the iri from the query, and store it in the TrackerFileSystem,
the mtime is unrequested, and even misleading in future operations.
parent bf8d1f7c
...@@ -1867,6 +1867,7 @@ tracker_file_notifier_get_file_iri (TrackerFileNotifier *notifier, ...@@ -1867,6 +1867,7 @@ tracker_file_notifier_get_file_iri (TrackerFileNotifier *notifier,
if (!iri && force) { if (!iri && force) {
TrackerSparqlCursor *cursor; TrackerSparqlCursor *cursor;
const gchar *str;
gchar *sparql; gchar *sparql;
/* Fetch data for this file synchronously */ /* Fetch data for this file synchronously */
...@@ -1875,14 +1876,19 @@ tracker_file_notifier_get_file_iri (TrackerFileNotifier *notifier, ...@@ -1875,14 +1876,19 @@ tracker_file_notifier_get_file_iri (TrackerFileNotifier *notifier,
sparql, NULL, NULL); sparql, NULL, NULL);
g_free (sparql); g_free (sparql);
if (cursor) { if (!cursor)
sparql_files_query_populate (notifier, cursor, FALSE); return NULL;
if (!tracker_sparql_cursor_next (cursor, NULL, NULL)) {
g_object_unref (cursor); g_object_unref (cursor);
return NULL;
} }
iri = tracker_file_system_get_property (priv->file_system, str = tracker_sparql_cursor_get_string (cursor, 1, NULL);
canonical, iri = g_strdup (str);
quark_property_iri); tracker_file_system_set_property (priv->file_system, canonical,
quark_property_iri, iri);
g_object_unref (cursor);
} }
return iri; return iri;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment