Skip to content

Commit 513628f

Browse files
committed
add canonical_home and compare against seen_dir
1 parent f7f3923 commit 513628f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/util/context/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,10 +1681,12 @@ impl GlobalContext {
16811681
seen_dir.insert(config_root);
16821682
}
16831683

1684+
let canonical_home = home.canonicalize().unwrap_or(home.to_path_buf());
1685+
16841686
// Once we're done, also be sure to walk the home directory even if it's not
16851687
// in our history to be sure we pick up that standard location for
16861688
// information.
1687-
if !seen_dir.contains(home) {
1689+
if !seen_dir.contains(&canonical_home) && !seen_dir.contains(home) {
16881690
if let Some(path) = self.get_file_path(home, "config", true)? {
16891691
walk(&path)?;
16901692
}

0 commit comments

Comments
 (0)