winfsp unit tests and fixes
This commit is contained in:
@ -484,25 +484,25 @@ template <typename string_t>
|
||||
std::basic_string_view<typename string_t::value_type> path) -> string_t {
|
||||
auto slash_t = get_slash<typename string_t::value_type>();
|
||||
|
||||
string_t ret;
|
||||
if (path == slash_t) {
|
||||
return ret;
|
||||
return string_t{path};
|
||||
}
|
||||
|
||||
ret = path.substr(0, path.rfind(slash_t) + 1);
|
||||
if (ret == slash_t) {
|
||||
return ret;
|
||||
auto sub_path = path.substr(0, path.rfind(slash_t) + 1);
|
||||
if (sub_path == slash_t) {
|
||||
return string_t{sub_path};
|
||||
}
|
||||
|
||||
string_t ret{sub_path};
|
||||
return utils::string::right_trim(ret, slash_t.at(0U));
|
||||
}
|
||||
|
||||
inline auto get_parent_api_path(std::string_view path) -> std::string {
|
||||
return get_parent_api_path_t<std::string>(path);
|
||||
return create_api_path(get_parent_api_path_t<std::string>(path));
|
||||
}
|
||||
|
||||
inline auto get_parent_api_path(std::wstring_view path) -> std::wstring {
|
||||
return get_parent_api_path_t<std::wstring>(path);
|
||||
return create_api_path(get_parent_api_path_t<std::wstring>(path));
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
|
Reference in New Issue
Block a user