Remove trailing slash from symlink completion (issue #13275) (#14667)

# Description
These changes fix #13275 where a slash is appended to completions of
symlinks pointing to directories.

# User-Facing Changes
The `/` character will no longer be appended to completions of symlinks.

Co-authored-by: Henry Jetmundsen <jet@henrys-mbp-2.lan>
This commit is contained in:
Henry Jetmundsen
2024-12-27 06:45:52 -05:00
committed by GitHub
parent 5f3c8d45d8
commit 76bbd41e43
3 changed files with 55 additions and 8 deletions

View File

@ -65,7 +65,7 @@ fn complete_rec(
for entry in result.filter_map(|e| e.ok()) {
let entry_name = entry.file_name().to_string_lossy().into_owned();
let entry_isdir = entry.path().is_dir();
let entry_isdir = entry.path().is_dir() && !entry.path().is_symlink();
let mut built = built.clone();
built.parts.push(entry_name.clone());
built.isdir = entry_isdir;