[gnome-photos] query-builder: Use fn:contains instead of fn:starts-with



commit afb6d4ecb10294840c070f59f4a25deb47455558
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Nov 17 22:12:16 2012 +0100

    query-builder: Use fn:contains instead of fn:starts-with
    
    This is all sorts of wrong conceptually, but we have a combination of
    [1] and [2], which makes it hard to use anything else.
    
    [1] https://bugzilla.gnome.org/666749
    [2] https://bugzilla.gnome.org/684257
    
    Original patch from Cosimo Cecchi for gnome-documents.

 src/photos-query-builder.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index e32c2fd..d07b23c 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -221,9 +221,9 @@ photos_query_builder_filter_local (void)
   path = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
   pictures_uri = photos_query_builder_convert_path_to_uri (path);
 
-  filter = g_strdup_printf ("((fn:starts-with (nie:url (?urn), \"%s\"))"
-                            " || (fn:starts-with (nie:url (?urn), \"%s\"))"
-                            " || (fn:starts-with (nie:url (?urn), \"%s\")))",
+  filter = g_strdup_printf ("((fn:contains (nie:url (?urn), \"%s\"))"
+                            " || (fn:contains (nie:url (?urn), \"%s\"))"
+                            " || (fn:contains (nie:url (?urn), \"%s\")))",
                             desktop_uri,
                             download_uri,
                             pictures_uri);



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