diff options
Diffstat (limited to 'extensions/fts++/indexer.cpp')
-rw-r--r-- | extensions/fts++/indexer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/fts++/indexer.cpp b/extensions/fts++/indexer.cpp index af96eac7..483caf7f 100644 --- a/extensions/fts++/indexer.cpp +++ b/extensions/fts++/indexer.cpp @@ -561,12 +561,13 @@ bool Indexer::IndexUri (std::string const& uri, std::string const& origin) size_t question_mark = uri.find ('?'); if (question_mark != std::string::npos) { - std::string stripped (uri, 0, question_mark - 1); + std::string stripped (uri, 0, question_mark); basename = g_path_get_basename (stripped.c_str ()); } else { - basename = g_file_get_basename (f); + // g_file_get_basename would unescape the uri, we don't want that here + basename = g_path_get_basename (uri.c_str ()); } // step 2) unescape and check that it's valid utf8 |