diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 485c9dec457f..12bf05a21c89 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -364,7 +364,7 @@ impl FindFilePicker { // the score, and only calculate it once during initialization move |path| { let suffix = if path.is_dir() { "/" } else { "" }; - let metadata = fs::metadata(&*path).unwrap(); + let metadata = path.symlink_metadata().unwrap(); let path = path.strip_prefix(&dir1).unwrap_or(path).to_string_lossy(); if cfg!(unix) { let filetype = fields::filetype(&metadata);