Commit 92a19102 authored by Sam Thursfield's avatar Sam Thursfield Committed by Debarshi Ray

item-manager: Avoid CRITICALs when adding an item to a mode

The mtime is stored as nfo:fileLastModified or nie:contentLastModified
in the Tracker database. These properties are of type xsd:dateTime,
and are returned as strings, not booleans. Hence it led to:
  Tracker-CRITICAL **: tracker_sparql_cursor_real_get_boolean:
    assertion '_tmp0_ == TRACKER_SPARQL_VALUE_TYPE_BOOLEAN' failed

These CRITICALs were more often (always?) triggered when using
TrackerSparqlConnection's 'bus' backend that uses D-Bus to access the
Tracker database. eg., the Flatpak builds that don't bundle the Tracker
D-Bus services.

Fallout from 3ad413e3

!149
parent df2ba503
......@@ -181,7 +181,7 @@ photos_item_manager_can_add_cursor_for_mode (PhotosItemManager *self,
gboolean ret_val = TRUE;
gint64 mtime;
mtime = tracker_sparql_cursor_get_boolean (cursor, PHOTOS_QUERY_COLUMNS_MTIME);
mtime = photos_utils_get_mtime_from_sparql_cursor (cursor);
ret_val = photos_item_manager_can_add_mtime_for_mode (self, mtime, mode);
return ret_val;
}
......
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