fix: traverse symbolic links under $CONIG_DIR/topgrade.d (#852) (#853)

This commit is contained in:
NAKASHIMA, Makoto
2024-07-07 14:47:53 +09:00
committed by GitHub
parent 960b14fa20
commit cb674a1572

View File

@@ -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()