winfsp unit tests and fixes

This commit is contained in:
2024-10-31 12:14:09 -05:00
parent 0303dcf16a
commit 2f8f38b6a2
3 changed files with 35 additions and 11 deletions

View File

@ -257,6 +257,10 @@ auto make_file_uri(std::wstring_view path) -> std::wstring {
}
auto strip_to_file_name(std::string path) -> std::string {
if (path == "." || path == "..") {
return path;
}
#if defined(_WIN32)
return ::PathFindFileNameA(path.c_str());
#else // !defined(_WIN32)