[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/runtime/nepomuk/services/strigi
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-04-30 9:59:32
Message-ID: 20100430095932.3A51DAC8A7 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1121081 by trueg:

Properly encode URLs in the filter strings. This fixes an issue with spaces (and \
other special chars) in file names.

 M  +2 -2      indexscheduler.cpp  


--- trunk/KDE/kdebase/runtime/nepomuk/services/strigi/indexscheduler.cpp \
#1121080:1121081 @@ -569,7 +569,7 @@
     {
         QStringList filters;
         foreach( const QString& folder, \
                Nepomuk::StrigiServiceConfig::self()->includeFolders() ) {
-            filters << QString::fromLatin1( "(?url!=<file://%1>)" ).arg( folder );
+            filters << QString::fromLatin1( "(?url!=%1)" ).arg( \
Soprano::Node::resourceToN3( KUrl( folder ) ) );  }
         return filters.join( QLatin1String( " && " ) );
     }
@@ -589,7 +589,7 @@
             subFilters << constructFolderSubFilter( folders, index );
         }
 
-        QString thisFilter = QString::fromLatin1( "REGEX(STR(?url),'^file://%1')" \
).arg( path ); +        QString thisFilter = QString::fromLatin1( \
"REGEX(STR(?url),'^%1')" ).arg( QString::fromAscii( KUrl( path ).toEncoded() ) );  
         // we want all folders that should NOT be indexed
         if ( include ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic