Skip to content

Commit

Permalink
fix: traverse symbolic links under $CONIG_DIR/topgrade.d (#852) (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
gifnksm authored Jul 7, 2024
1 parent 960b14f commit cb674a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cb674a1

Please sign in to comment.