mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Remove leftover use of str2wcs.
This commit is contained in:
parent
37bdb20092
commit
cc5c411039
1 changed files with 3 additions and 4 deletions
|
@ -333,14 +333,13 @@ wchar_t *wrealpath(const wcstring &pathname, wchar_t *resolved_path)
|
||||||
|
|
||||||
if (resolved_path)
|
if (resolved_path)
|
||||||
{
|
{
|
||||||
wchar_t *tmp2 = str2wcs(narrow_res);
|
wcstring tmp2 = str2wcstring(narrow_res);
|
||||||
wcslcpy(resolved_path, tmp2, PATH_MAX);
|
wcslcpy(resolved_path, tmp2.c_str(), PATH_MAX);
|
||||||
free(tmp2);
|
|
||||||
res = resolved_path;
|
res = resolved_path;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res = str2wcs(narrow_res);
|
res = wcsdup(str2wcstring(narrow_res).c_str());
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue