updated build system

This commit is contained in:
Scott E. Graves 2024-08-02 12:10:55 -05:00
parent 1893f7204e
commit c1f39afaa3
2 changed files with 10 additions and 3 deletions

View File

@ -218,7 +218,9 @@ get_parent_api_path(std::wstring_view path) -> std::wstring;
[[nodiscard]] auto resolve(std::wstring_view path) -> std::wstring; [[nodiscard]] auto resolve(std::wstring_view path) -> std::wstring;
#endif // !defined(_WIN32) #endif // !defined(_WIN32)
[[nodiscard]] auto strip_to_file_name(std::string_view path) -> std::string; [[nodiscard]] auto strip_to_file_name(std::string path) -> std::string;
[[nodiscard]] auto strip_to_file_name(std::wstring path) -> std::wstring;
[[nodiscard]] auto unmake_file_uri(std::string_view uri) -> std::string; [[nodiscard]] auto unmake_file_uri(std::string_view uri) -> std::string;

View File

@ -178,9 +178,14 @@ auto resolve(std::wstring_view path) -> std::wstring {
auto strip_to_file_name(std::string path) -> std::string { auto strip_to_file_name(std::string path) -> std::string {
#if defined(_WIN32) #if defined(_WIN32)
return ::PathFindFileName(path.c_str()); return ::PathFindFileName(path.c_str());
#else #else // !defined(_WIN32)
return utils::string::contains(path, "/") ? basename(path.data()) : path; return utils::string::contains(path, "/") ? basename(path.data()) : path;
#endif #endif // defined(_WIN32)
}
auto strip_to_file_name(std::wstring path) -> std::wstring {
return utils::string::to_utf8(
strip_to_file_name(utils::string::to_utf8(path)));
} }
auto unmake_file_uri(std::string_view uri) -> std::string { auto unmake_file_uri(std::string_view uri) -> std::string {