Indeed, the translation to filex URLs in queries is pretty dumb. It only looks for the file:// prefix and continues from there.
However, query 3 should always work and I found the bug. The parenthesis get percent-encoded. :( I will try to fix that. On 05/24/2012 03:56 PM, Ignacio Serantes wrote: > Hi, > > There is a bug handling filex files when there are parenthesis in the > url and you are doing a query using the fullpath. > > This are steps to reproduce the bug. > > 1) Create a file named "test_(fail).txt" in an external HD, I created > the file "/media/OneTouch4/test_(fail).txt". > 2) If the location is not indexed you must use nepomukindexer to index > the file. > 3) Open NepSak and execute next queries: > > Query 1: > > *SELECT* *DISTINCT* * > > *WHERE* { > > ?uri nie:url ?url . *FILTER*(*REGEX*(?url, > "test_\\(fail\\).txt"^^xsd:string, 'i')) > > } > > > Query 2: > > *SELECT* *DISTINCT* * > > *WHERE* { > > ?uri nie:url ?url . *FILTER*(*REGEX*(?url, > "/media/OneTouch4/test_\\(fail\\).txt"^^xsd:string, 'i')) > > } > > > Query 3: > > *SELECT* *DISTINCT* * > > *WHERE* { > > ?uri nie:url ?url . *FILTER*(*REGEX*(?url, > "file:///media/OneTouch4/test_\\(fail\\).txt"^^xsd:string, 'i')) > > } > > > *Notes:* > > 1) I'm using KDE 4.8.3, Soprano 2.7.5 and Virtuoso 6.1.5 openSUSE > official packages. > > > *Results:* > 1) Query 1 works but queries 2 and 3 don't. > 2) If url has not parenthesis, and is a filex file, queries 1 and 3 > works but query 2 fails. So, seems like with filex files "file:///" > prefix is mandatory but with normal files don't. This is not a problem > when you know this behavior but could be a serious problem if you don't > know. > 3) If url is not a filex file all queries works. > > -- > Best wishes, > Ignacio > > > > > _______________________________________________ > Nepomuk mailing list > Nepomuk@kde.org > https://mail.kde.org/mailman/listinfo/nepomuk _______________________________________________ Nepomuk mailing list Nepomuk@kde.org https://mail.kde.org/mailman/listinfo/nepomuk