|
|
2d6c76 |
From 4e095d31acb53b7f393dc7a5ecdbd427f2529a68 Mon Sep 17 00:00:00 2001
|
|
|
2d6c76 |
From: Debarshi Ray <debarshir@gnome.org>
|
|
|
2d6c76 |
Date: Mon, 27 Mar 2017 18:36:30 +0200
|
|
|
2d6c76 |
Subject: [PATCH] zpj: Use an HTTP URL as nie:url
|
|
|
2d6c76 |
|
|
|
2d6c76 |
The nao:identifier value is not a valid nie:url. The identifier has the
|
|
|
2d6c76 |
format "windows-live:skydrive:<id>", and is not a GVfs supported URI.
|
|
|
2d6c76 |
This is a problem because the nie:url is used to locate the path to
|
|
|
2d6c76 |
the entry's thumbnail in the desktop's thumbnail cache. Running
|
|
|
2d6c76 |
g_file_query_info (file, G_FILE_ATTRIBUTE_THUMBNAIL_PATH, ...) on such
|
|
|
2d6c76 |
a URI will fail. Therefore we use a fake OneDrive-namespaced URI that
|
|
|
2d6c76 |
GVfs understands.
|
|
|
2d6c76 |
|
|
|
2d6c76 |
Force a full reindex of OneDrive resources for existing users.
|
|
|
2d6c76 |
---
|
|
|
2d6c76 |
src/gom-zpj-miner.c | 7 +++++--
|
|
|
2d6c76 |
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
2d6c76 |
|
|
|
2d6c76 |
diff --git a/src/gom-zpj-miner.c b/src/gom-zpj-miner.c
|
|
|
2d6c76 |
index 6dff947ada9d..da54c2a53be5 100644
|
|
|
2d6c76 |
--- a/src/gom-zpj-miner.c
|
|
|
2d6c76 |
+++ b/src/gom-zpj-miner.c
|
|
|
2d6c76 |
@@ -46,6 +46,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
|
|
|
2d6c76 |
gchar *contact_resource;
|
|
|
2d6c76 |
gchar *resource = NULL;
|
|
|
2d6c76 |
gchar *date, *identifier;
|
|
|
2d6c76 |
+ gchar *url = NULL;
|
|
|
2d6c76 |
const gchar *class = NULL, *id, *name;
|
|
|
2d6c76 |
gboolean resource_exists, mtime_changed;
|
|
|
2d6c76 |
gint64 new_mtime;
|
|
|
2d6c76 |
@@ -99,11 +100,12 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
|
|
|
2d6c76 |
goto out;
|
|
|
2d6c76 |
|
|
|
2d6c76 |
/* the resource changed - just set all the properties again */
|
|
|
2d6c76 |
+ url = g_strconcat ("http://onedrive.com/", id, NULL);
|
|
|
2d6c76 |
gom_tracker_sparql_connection_insert_or_replace_triple
|
|
|
2d6c76 |
(connection,
|
|
|
2d6c76 |
cancellable, error,
|
|
|
2d6c76 |
datasource_urn, resource,
|
|
|
2d6c76 |
- "nie:url", identifier);
|
|
|
2d6c76 |
+ "nie:url", url);
|
|
|
2d6c76 |
|
|
|
2d6c76 |
if (*error != NULL)
|
|
|
2d6c76 |
goto out;
|
|
|
2d6c76 |
@@ -202,6 +204,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
|
|
|
2d6c76 |
out:
|
|
|
2d6c76 |
g_free (resource);
|
|
|
2d6c76 |
g_free (identifier);
|
|
|
2d6c76 |
+ g_free (url);
|
|
|
2d6c76 |
|
|
|
2d6c76 |
if (*error != NULL)
|
|
|
2d6c76 |
return FALSE;
|
|
|
2d6c76 |
@@ -324,7 +327,7 @@ gom_zpj_miner_class_init (GomZpjMinerClass *klass)
|
|
|
2d6c76 |
|
|
|
2d6c76 |
miner_class->goa_provider_type = "windows_live";
|
|
|
2d6c76 |
miner_class->miner_identifier = MINER_IDENTIFIER;
|
|
|
2d6c76 |
- miner_class->version = 1;
|
|
|
2d6c76 |
+ miner_class->version = 2;
|
|
|
2d6c76 |
|
|
|
2d6c76 |
miner_class->create_services = create_services;
|
|
|
2d6c76 |
miner_class->query = query_zpj;
|
|
|
2d6c76 |
--
|
|
|
2d6c76 |
2.9.3
|
|
|
2d6c76 |
|