From cb674a157218c7d95149fbc959b7ecabd899aff3 Mon Sep 17 00:00:00 2001 From: "NAKASHIMA, Makoto" Date: Sun, 7 Jul 2024 14:47:53 +0900 Subject: [PATCH] fix: traverse symbolic links under `$CONIG_DIR/topgrade.d` (#852) (#853) --- src/config.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 0f572dd1..129aaf07 100644 --- a/src/config.rs +++ b/src/config.rs @@ -533,7 +533,9 @@ impl ConfigFile { if dir_to_search.exists() { for entry in fs::read_dir(dir_to_search)? { let entry = entry?; - if entry.file_type()?.is_file() { + // Use `Path::is_file()` here to traverse symbolic links. + // `DirEntry::file_type()` and `FileType::is_file()` will not traverse symbolic links. + if entry.path().is_file() { debug!( "Found additional (directory) configuration file at {}", entry.path().display()