fix(find): Strip excess ./ from file path prefix
This commit is contained in:
parent
f7823707fc
commit
90b5b229c2
1 changed files with 6 additions and 1 deletions
|
|
@ -126,7 +126,12 @@ impl SearchContext {
|
|||
.map(|pos| line[pos + 1..].to_owned())
|
||||
.unwrap_or_else(|| line.clone());
|
||||
|
||||
let description = ["~/", line.as_str()].concat();
|
||||
let line = match line.strip_prefix("./") {
|
||||
Some(line) => line,
|
||||
None => line.as_str(),
|
||||
};
|
||||
|
||||
let description = ["~/", line].concat();
|
||||
|
||||
let path = PathBuf::from(line);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue