mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 08:56:43 +08:00
Remove redundant variable
normalize_path returns a wcstring, so the check can't fail. Just pass it directly.
This commit is contained in:
parent
a78d9d8e9a
commit
4046b4cedf
|
@ -834,11 +834,8 @@ static void expand_home_directory(wcstring &input, const environment_t &vars) {
|
|||
}
|
||||
}
|
||||
|
||||
maybe_t<wcstring> realhome;
|
||||
if (home) realhome = normalize_path(*home);
|
||||
|
||||
if (realhome) {
|
||||
input.replace(input.begin(), input.begin() + tail_idx, *realhome);
|
||||
if (home) {
|
||||
input.replace(input.begin(), input.begin() + tail_idx, normalize_path(*home));
|
||||
} else {
|
||||
input[0] = L'~';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user