[gnome-builder] project-tree: initialize is_dir before use
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] project-tree: initialize is_dir before use
- Date: Sun, 17 Dec 2017 08:45:41 +0000 (UTC)
commit 5d7c1b6aee6fc80b174864d1c7f0e94b004e3048
Author: Christian Hergert <chergert redhat com>
Date: Sun Dec 17 00:36:57 2017 -0800
project-tree: initialize is_dir before use
src/plugins/project-tree/gb-project-tree-builder.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/project-tree/gb-project-tree-builder.c
b/src/plugins/project-tree/gb-project-tree-builder.c
index 8d651ca..6cc7533 100644
--- a/src/plugins/project-tree/gb-project-tree-builder.c
+++ b/src/plugins/project-tree/gb-project-tree-builder.c
@@ -101,11 +101,11 @@ gb_project_tree_builder_add (GbProjectTreeBuilder *self,
display_name = gb_project_file_get_display_name (item);
icon_name = gb_project_file_get_icon_name (item);
+ is_dir = g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY;
+
if (is_dir)
expanded = "folder-open-symbolic";
- is_dir = g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY;
-
child = g_object_new (DZL_TYPE_TREE_NODE,
"children-possible", is_dir,
"reset-on-collapse", is_dir,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]