From 3fc7cf0d90c6ffb77466904a472c758e30c4be61 Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Mon, 30 Sep 2024 12:20:55 -0500 Subject: [PATCH] Use is_file instead of existence in finding .ozy.yaml Fixes an issue where if you have a magic filesystem on your cwd (e.g. `envy` via autofs) which dreams up directories if you ask it ...then `ozy` used to: ``` Error: While loading ozy config Caused by: 0: Reading config YAML 1: Is a directory (os error 21) ``` --- rozy/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rozy/src/config.rs b/rozy/src/config.rs index 43def98..af52269 100644 --- a/rozy/src/config.rs +++ b/rozy/src/config.rs @@ -19,7 +19,7 @@ pub fn load_config(base_config_filename_override: Option<&str>) -> Result = curr_dir.ancestors().collect(); for dir in ancestors.iter().rev() { let ozy_config_path = dir.join(".ozy.yaml"); - if !ozy_config_path.exists() { + if !ozy_config_path.is_file() { continue; }