From 2e0d93e5f1bdc75ec9c64fd37795f8da63b9fc30 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Fri, 8 Feb 2013 11:09:17 +0100 Subject: [PATCH] A file suffix in file chooser would rank too high --- Frameworks/OakFilterList/src/FileChooser.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frameworks/OakFilterList/src/FileChooser.mm b/Frameworks/OakFilterList/src/FileChooser.mm index 145fdc82..920cf9e8 100644 --- a/Frameworks/OakFilterList/src/FileChooser.mm +++ b/Frameworks/OakFilterList/src/FileChooser.mm @@ -524,7 +524,7 @@ inline void rank_record (document_record_t& record, filter_string_t const& filte size_t bindingIndex = std::find(bindings.begin(), bindings.end(), record.full_path) - bindings.begin(); if((filter.selection != NULL_STR || filter.symbol != NULL_STR) && record.place_last && filter.full_path().empty()) record.rank = 0; - else if(!filter.raw_path.empty() && record.full_path.rfind(filter.raw_path) == record.full_path.size() - filter.raw_path.size()) + else if(!filter.raw_path.empty() && path::is_child(filter.raw_path, record.full_path)) record.rank = 0; else if(record.place_last) record.rank = 1;