[Nepomuk] [BUG] with filex files

Sebastian Trüg sebastian at trueg.de
Thu May 31 08:20:43 UTC 2012


fixed now.

On 05/30/2012 04:08 PM, Ignacio Serantes wrote:
> I have a method named toN3 with next code:
> 
> *def toN3(url = ''):*
> *    if url[0] == '^':*
> *        result = '^' + QUrl(url[1:]).toEncoded()*
> *
> *
> *    else:*
> *        result = QUrl(url).toEncoded()*
> *
> *
> *    return result*
> 
> but is not working with "?" and the next change is required to query for
> files like "test?.txt"
> 
> *    return result.replace('?', '%3f')*
> 
> Any other know exception?
> 
> 
> On Wed, May 30, 2012 at 3:54 PM, Ignacio Serantes <kde at aynoa.net
> <mailto:kde at aynoa.net>> wrote:
> 
>     Maybe there are other character with issues, like "?" or "+".
> 
> 
>     On Wed, May 30, 2012 at 2:55 PM, Sebastian Trüg <sebastian at trueg.de
>     <mailto:sebastian at trueg.de>> wrote:
> 
>         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 at kde.org <mailto:Nepomuk at kde.org>
>         > https://mail.kde.org/mailman/listinfo/nepomuk
>         _______________________________________________
>         Nepomuk mailing list
>         Nepomuk at kde.org <mailto:Nepomuk at kde.org>
>         https://mail.kde.org/mailman/listinfo/nepomuk
> 
> 
> 
> 
>     -- 
>     Best wishes,
>     Ignacio
> 
> 
> 
> 
> 
> -- 
> Best wishes,
> Ignacio
> 
> 
> 
> 
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk


More information about the Nepomuk mailing list