mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-15 01:11:09 +03:00
Fix real_path again
This commit is contained in:
parent
6d8747b886
commit
6e695e37be
@ -79,7 +79,11 @@ String real_path(StringView filename)
|
|||||||
{
|
{
|
||||||
if (non_existing.empty())
|
if (non_existing.empty())
|
||||||
return res;
|
return res;
|
||||||
return format("{}/{}", res, non_existing);
|
|
||||||
|
StringView dir = res;
|
||||||
|
if (dir.substr(dir.length()-1_byte, 1_byte) == "/")
|
||||||
|
dir = dir.substr(0_byte, dir.length()-1_byte);
|
||||||
|
return format("{}/{}", dir, non_existing);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto it = find(existing.rbegin() + 1, existing.rend(), '/');
|
auto it = find(existing.rbegin() + 1, existing.rend(), '/');
|
||||||
|
Loading…
Reference in New Issue
Block a user