Add trailing slash in completion of symlinked dir (#3921)

This commit is contained in:
Nathan 2021-08-16 15:13:59 -04:00 committed by GitHub
parent 65c639cf13
commit ab961a78cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ impl PathCompleter {
let mut file_name = entry.file_name().to_string_lossy().into_owned();
if matcher.matches(partial, file_name.as_str()) {
let mut path = format!("{}{}", &base_dir_name, file_name);
if entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false) {
if entry.path().is_dir() {
path.push(SEP);
file_name.push(SEP);
}