[gnome-builder] file-search: don't follow through symlinks
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] file-search: don't follow through symlinks
- Date: Thu, 25 Jan 2018 08:23:14 +0000 (UTC)
commit 3458b9b12a7b87fa465eab4939e2c0c26f2e943f
Author: Christian Hergert <chergert redhat com>
Date: Thu Jan 25 00:11:23 2018 -0800
file-search: don't follow through symlinks
src/plugins/file-search/gb-file-search-index.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/file-search/gb-file-search-index.c b/src/plugins/file-search/gb-file-search-index.c
index 4b1460fca..3428053d8 100644
--- a/src/plugins/file-search/gb-file-search-index.c
+++ b/src/plugins/file-search/gb-file-search-index.c
@@ -150,6 +150,7 @@ populate_from_dir (DzlFuzzyMutableIndex *fuzzy,
return;
enumerator = g_file_enumerate_children (directory,
+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK","
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME","
G_FILE_ATTRIBUTE_STANDARD_TYPE,
G_FILE_QUERY_INFO_NONE,
@@ -167,6 +168,9 @@ populate_from_dir (DzlFuzzyMutableIndex *fuzzy,
GFileType file_type;
const gchar *name;
+ if (g_file_info_get_is_symlink (file_info))
+ continue;
+
name = g_file_info_get_display_name (file_info);
file = g_file_get_child (directory, name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]