[tracker-miners: 1/2] Add also fileSize to the basic set of file info on all the graph




commit badf8dd65cf40c0292028e673f26ef31d491e0b2
Author: Pekka Vuorela <pekka vuorela jolla com>
Date:   Mon Jul 5 12:35:33 2021 +0300

    Add also fileSize to the basic set of file info on all the graph
    
    No need to depend on FileSystem graph to have the sizes.
    
    Related: https://gitlab.gnome.org/GNOME/tracker/-/issues/221

 src/miners/fs/tracker-miner-files.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 1ff3b26c6..cafcc1c69 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2179,6 +2179,9 @@ miner_files_process_file (TrackerMinerFS      *fs,
                                             g_file_info_get_display_name (file_info));
 
                tracker_resource_set_datetime (graph_file, "nfo:fileLastModified", modified);
+
+               tracker_resource_set_int64 (graph_file, "nfo:fileSize",
+                                           g_file_info_get_size (file_info));
        }
 
        if (delete_properties_sparql)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]