[tracker-miners/wip/carlosg/mtime-in-graphs: 3/3] tracker-miner-fs: Set nfo:fileLastModified in the specific graphs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/mtime-in-graphs: 3/3] tracker-miner-fs: Set nfo:fileLastModified in the specific graphs
- Date: Thu, 27 Aug 2020 09:40:02 +0000 (UTC)
commit 40a86cfd459fa8ad64cd9e95389fe3d85dcaee18
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 27 08:01:20 2020 +0200
tracker-miner-fs: Set nfo:fileLastModified in the specific graphs
So this minimal information is available to the users of those
graphs.
Fixes: https://gitlab.gnome.org/GNOME/tracker-miners/-/issues/132
src/miners/fs/tracker-miner-files.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 312d62d65..89ed71f6e 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2202,6 +2202,12 @@ process_file_cb (GObject *object,
*/
graph_file = tracker_resource_new (uri);
tracker_resource_add_uri (graph_file, "rdf:type", "nfo:FileDataObject");
+
+ time_ = g_file_info_get_attribute_uint64 (file_info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
+ time_str = tracker_date_to_string (time_);
+ tracker_resource_set_string (resource, "nfo:fileLastModified", time_str);
+ g_free (time_str);
+
graph_file_str = tracker_resource_print_sparql_update (graph_file,
NULL, graph);
g_object_unref (graph_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]