[gnome-documents] query: use fn:contains instead of fn:starts-with for path matching



commit 29b6bc7d2db52955117a3340bd2ff5434b39dc56
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Sep 17 17:17:44 2012 -0400

    query: use fn:contains instead of fn:starts-with for path matching
    
    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/show_bug.cgi?id=666749
    [2] https://bugzilla.gnome.org/show_bug.cgi?id=684257

 src/query.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/query.js b/src/query.js
index c3e3f2d..ba66f50 100644
--- a/src/query.js
+++ b/src/query.js
@@ -88,9 +88,9 @@ const QueryBuilder = new Lang.Class({
             downloadsURI = '';
 
         let filter =
-            ('((fn:starts-with (nie:url(?urn), "%s")) || ' +
-             ' (fn:starts-with (nie:url(?urn), "%s")) || ' +
-             ' (fn:starts-with (nie:url(?urn), "%s")) || ' +
+            ('((fn:contains (nie:url(?urn), "%s")) || ' +
+             ' (fn:contains (nie:url(?urn), "%s")) || ' +
+             ' (fn:contains (nie:url(?urn), "%s")) || ' +
              ' (fn:starts-with (nao:identifier(?urn), "gd:collection:local:")))').format(desktopURI, documentsURI, downloadsURI);
 
         return filter;



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