[bijiben] tracker: clean up obsolete workaround with urn



commit d99e91218a8d7bed050c09b05c22b527e3a6f76a
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Sun May 12 02:29:54 2013 +0200

    tracker: clean up obsolete workaround with urn
    
    old request was returning both file:///path/to/file and /path/to/file
    new one has only one format, either file path or collection urn

 src/libbiji/biji-tracker.c |   23 +++--------------------
 1 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/src/libbiji/biji-tracker.c b/src/libbiji/biji-tracker.c
index c8eeae4..41ab6b1 100644
--- a/src/libbiji/biji-tracker.c
+++ b/src/libbiji/biji-tracker.c
@@ -310,33 +310,17 @@ biji_get_notes_with_strings_or_collection_finish (GObject *source_object,
 
   if (cursor)
   {
-    const gchar *full_path;
-    gchar *path;
+    const gchar *path;
     BijiItem *item = NULL;
 
     while (tracker_sparql_cursor_next (cursor, NULL, NULL))
     {
-      full_path = tracker_sparql_cursor_get_string (cursor, 0, NULL);
-
-      if (g_str_has_prefix (full_path, "file://"))
-      {
-        GString *string;
-        string = g_string_new (full_path);
-        g_string_erase (string, 0, 7);
-        path = g_string_free (string, FALSE);
-      }
-      else
-      {
-        path = g_strdup (full_path);
-      }
-
+      path = tracker_sparql_cursor_get_string (cursor, 0, NULL);
       item = biji_note_book_get_item_at_path (book, path);
 
       /* Sorting is done in another place */
       if (item)
         result = g_list_prepend (result, item);
-
-      g_free (path);
     }
 
     g_object_unref (cursor);
@@ -345,8 +329,7 @@ biji_get_notes_with_strings_or_collection_finish (GObject *source_object,
   return result;
 }
 
-/* FIXME : the nie:isPartOf returns file://$path, while
- *         union fts returns $path which leads to uggly code */
+
 void
 biji_get_notes_with_string_or_collection_async (gchar *needle, GAsyncReadyCallback f, gpointer user_data)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]