[tracker/wip/carlosg/domain-ontologies: 26/30] libtracker-data: Use filename based on cachedir for ontologies.gvdb
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/domain-ontologies: 26/30] libtracker-data: Use filename based on cachedir for ontologies.gvdb
- Date: Sun, 4 Jun 2017 15:47:56 +0000 (UTC)
commit 643f268503a0e206f67b6eab0fd12cc507765914
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jun 4 16:20:34 2017 +0200
libtracker-data: Use filename based on cachedir for ontologies.gvdb
Otherwise other database prefixes mess up with the canonical location.
src/libtracker-data/tracker-data-manager.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index e8f1b16..befaf30 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3601,11 +3601,11 @@ write_ontologies_gvdb (gboolean overwrite,
{
gboolean retval = TRUE;
gchar *filename;
+ GFile *child;
- filename = g_build_filename (g_get_user_cache_dir (),
- "tracker",
- "ontologies.gvdb",
- NULL);
+ child = g_file_get_child (cache_location_stored, "ontologies.gvdb");
+ filename = g_file_get_path (child);
+ g_object_unref (child);
if (overwrite || !g_file_test (filename, G_FILE_TEST_EXISTS)) {
retval = tracker_ontologies_write_gvdb (filename, error);
@@ -3620,11 +3620,11 @@ static void
load_ontologies_gvdb (GError **error)
{
gchar *filename;
+ GFile *child;
- filename = g_build_filename (g_get_user_cache_dir (),
- "tracker",
- "ontologies.gvdb",
- NULL);
+ child = g_file_get_child (cache_location_stored, "ontologies.gvdb");
+ filename = g_file_get_path (child);
+ g_object_unref (child);
tracker_ontologies_load_gvdb (filename, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]