[tracker-miners/wip/carlosg/stable-content-urns: 4/7] tracker-extract: Add dummy folder rule
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/stable-content-urns: 4/7] tracker-extract: Add dummy folder rule
- Date: Wed, 29 Dec 2021 15:50:36 +0000 (UTC)
commit 075fdd3e0ac8814c014287ab497815788b6a2985
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Dec 13 13:13:38 2021 +0100
tracker-extract: Add dummy folder rule
We want these to have a tracker:extractorHash since there might be also
changes that apply to them. However we don't want these to be caught by
the extractor, so make it sure that tracker-miner-fs-3 sets the extractor
hash right away for these.
src/miners/fs/tracker-miner-files-methods.c | 4 ++++
src/tracker-extract/10-folder.rule | 4 ++++
src/tracker-extract/meson.build | 2 +-
3 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/miners/fs/tracker-miner-files-methods.c b/src/miners/fs/tracker-miner-files-methods.c
index d8b2c97ca..cb5ada7ee 100644
--- a/src/miners/fs/tracker-miner-files-methods.c
+++ b/src/miners/fs/tracker-miner-files-methods.c
@@ -243,6 +243,10 @@ tracker_miner_files_process_file (TrackerMinerFS *fs,
tracker_sparql_buffer_push (buffer, file, special_graphs[i], folder_resource);
}
}
+
+ /* Always use inode/directory here, we don't really care if it's a symlink */
+ tracker_resource_set_string (resource, "tracker:extractorHash",
+ tracker_extract_module_manager_get_hash ("inode/directory"));
}
miner_files_add_to_datasource (TRACKER_MINER_FILES (fs), file, resource, folder_resource);
diff --git a/src/tracker-extract/10-folder.rule b/src/tracker-extract/10-folder.rule
new file mode 100644
index 000000000..7ab340f2f
--- /dev/null
+++ b/src/tracker-extract/10-folder.rule
@@ -0,0 +1,4 @@
+[ExtractorRule]
+MimeTypes=inode/directory;
+FallbackRdfTypes=nfo:Folder;
+Hash=@hash@
diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build
index 129d87431..ccf806ca7 100644
--- a/src/tracker-extract/meson.build
+++ b/src/tracker-extract/meson.build
@@ -7,7 +7,7 @@
modules = [
['extract-bmp', 'tracker-extract-bmp.c', ['10-bmp.rule'], [tracker_miners_common_dep]],
['extract-desktop', 'tracker-extract-desktop.c', ['10-desktop.rule'], [tracker_miners_common_dep]],
- ['extract-dummy', 'tracker-extract-dummy.c', ['10-comics.rule', '10-ebooks.rule', '15-games.rule',
'15-executable.rule'], [tracker_miners_common_dep]]
+ ['extract-dummy', 'tracker-extract-dummy.c', ['10-comics.rule', '10-ebooks.rule', '10-folder.rule',
'15-games.rule', '15-executable.rule'], [tracker_miners_common_dep]]
]
if get_option('abiword')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]