aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-11-11 19:01:08 +0100
committerGitHub <noreply@github.com>2024-11-11 19:01:08 +0100
commit7bcd5696a591b3ad6bd9feb4e15f113708736841 (patch)
tree1ee0e2941fdf9f4f7d7a2671bbfdae377e816a7c
parentdocs(changelog): kitty reset fix (diff)
downloadsl0ppij-7bcd5696a591b3ad6bd9feb4e15f113708736841.tar.gz
sl0ppij-7bcd5696a591b3ad6bd9feb4e15f113708736841.tar.xz
sl0ppij-7bcd5696a591b3ad6bd9feb4e15f113708736841.zip
fix(config): crash if unable to watch config folder (#3761)
-rw-r--r--zellij-client/src/lib.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/zellij-client/src/lib.rs b/zellij-client/src/lib.rs
index fad3c88b..8738650e 100644
--- a/zellij-client/src/lib.rs
+++ b/zellij-client/src/lib.rs
@@ -707,10 +707,13 @@ fn report_changes_in_config_file(
})
.unwrap();
if let Some(config_file_parent_folder) = config_file_path.parent() {
- watcher
- .watch(&config_file_parent_folder, RecursiveMode::Recursive)
- .unwrap();
- Some(Box::new(watcher))
+ match watcher.watch(&config_file_parent_folder, RecursiveMode::Recursive) {
+ Ok(_) => Some(Box::new(watcher)),
+ Err(e) => {
+ log::error!("Failed to watch config file folder: {}", e);
+ None
+ },
+ }
} else {
log::error!("Could not find config parent folder");
None