Skip to content

Commit e169b8b

Browse files
committed
nemo-search-engine-advanced.c: a couple fixes.
- Use -1 instead of G_MAXSSIZE for g_utf8_strlen() - Fix trying to free the wrong item when checking the folder skip list.
1 parent e606057 commit e169b8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libnemo-private/nemo-search-engine-advanced.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ search_for_content_hits (SearchThreadData *data,
864864
fsr = file_search_result_new (g_file_get_uri (file));
865865
}
866866

867-
file_search_result_add_hit (fsr, create_snippet (match_info, stripped, g_utf8_strlen (stripped, G_MAXSSIZE)));
867+
file_search_result_add_hit (fsr, create_snippet (match_info, stripped, g_utf8_strlen (stripped, -1)));
868868

869869
if (!data->count_hits) {
870870
break;
@@ -1033,7 +1033,7 @@ search_thread_func (gpointer user_data)
10331033

10341034
if (!toplevel) {
10351035
if (g_hash_table_contains (data->skip_folders, g_file_peek_path (dir))) {
1036-
g_object_unref (data);
1036+
g_object_unref (dir);
10371037
continue;
10381038
}
10391039

0 commit comments

Comments
 (0)