[tracker-miners/sam/test-fixes: 7/8] tracker-extract: Ensure nfo:FileDataObject is always set
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/sam/test-fixes: 7/8] tracker-extract: Ensure nfo:FileDataObject is always set
- Date: Fri, 1 May 2020 23:41:32 +0000 (UTC)
commit 2dbc86ac13336a2c7f0ffeefd66337fe2574de19
Author: Sam Thursfield <sam afuera me uk>
Date: Sat May 2 00:48:50 2020 +0200
tracker-extract: Ensure nfo:FileDataObject is always set
If we are going to set the nie:DataSource property, we need to ensure
the correct class.
Fixes 'constraint failed' errors after moving a file.
src/tracker-extract/tracker-extract-decorator.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/tracker-extract/tracker-extract-decorator.c b/src/tracker-extract/tracker-extract-decorator.c
index 039882ff3..0a72d1837 100644
--- a/src/tracker-extract/tracker-extract-decorator.c
+++ b/src/tracker-extract/tracker-extract-decorator.c
@@ -166,6 +166,7 @@ decorator_save_info (TrackerExtractDecorator *decorator,
tracker_resource_set_identifier (resource, urn);
file_resource = tracker_resource_new (tracker_decorator_info_get_url (decorator_info));
+ tracker_resource_add_uri (file_resource, "rdf:type", "nfo:FileDataObject");
tracker_resource_add_uri (file_resource, "nie:dataSource",
tracker_decorator_get_data_source (TRACKER_DECORATOR (decorator)));
tracker_resource_add_take_relation (resource, "nie:isStoredAs", file_resource);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]