fix
This commit is contained in:
parent
6718eb374d
commit
e37a375c18
6
support/3rd_party/src/utils/path.cpp
vendored
6
support/3rd_party/src/utils/path.cpp
vendored
@ -36,7 +36,7 @@ static const std::wstring directory_seperator_str_w{
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace repertory::utils::path {
|
namespace repertory::utils::path {
|
||||||
inline auto absolute(std::string_view path) -> std::string {
|
auto absolute(std::string_view path) -> std::string {
|
||||||
std::string abs_path{path};
|
std::string abs_path{path};
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (not abs_path.empty() && ::PathIsRelative(abs_path.c_str())) {
|
if (not abs_path.empty() && ::PathIsRelative(abs_path.c_str())) {
|
||||||
@ -57,7 +57,7 @@ inline auto absolute(std::string_view path) -> std::string {
|
|||||||
} else if (tmp == ".") {
|
} else if (tmp == ".") {
|
||||||
found = true;
|
found = true;
|
||||||
} else {
|
} else {
|
||||||
tmp = dirname(tmp.c_str());
|
tmp = dirname(tmp.data());
|
||||||
}
|
}
|
||||||
} while (not found);
|
} while (not found);
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ inline auto absolute(std::string_view path) -> std::string {
|
|||||||
return finalize(abs_path);
|
return finalize(abs_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline auto absolute(std::wstring_view path) -> std::wstring {
|
auto absolute(std::wstring_view path) -> std::wstring {
|
||||||
return utils::string::from_utf8(absolute(utils::string::to_utf8(path)));
|
return utils::string::from_utf8(absolute(utils::string::to_utf8(path)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user