From 62aef1728bff78bdcf4bc8650cc0858e766a89f5 Mon Sep 17 00:00:00 2001 From: Soumya Ranjan Patnaik Date: Sun, 23 Jul 2023 04:55:15 +0530 Subject: [PATCH] fix(wayland): ilia returns empty keybindings page if a directory included in the configs doesn't exist --- src/keybindings/I3Ipc.vala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/keybindings/I3Ipc.vala b/src/keybindings/I3Ipc.vala index feedaca..27c1492 100644 --- a/src/keybindings/I3Ipc.vala +++ b/src/keybindings/I3Ipc.vala @@ -118,7 +118,7 @@ namespace Ilia { // Head of queue doesn't change if the string doesn't contain widcards Posix.Glob pathMatcher = Posix.Glob (); string path_glob = path_queue.pop_head (); - pathMatcher.glob (path_glob); + pathMatcher.glob (path_glob, Posix.GLOB_NOCHECK | Posix.GLOB_NOSORT); foreach (unowned string matched_path in pathMatcher.pathv) { path_queue.push_head (matched_path); } @@ -134,7 +134,12 @@ namespace Ilia { // Read config partial and append to config builder string config_partial; - FileUtils.get_contents (config_path, out config_partial); + try { + FileUtils.get_contents (config_path, out config_partial); + } catch (GLib.Error err) { + continue; + } + configBuilder.append (config_partial); // Append paths of configs included from current config partial to queue for bfs