aboutsummaryrefslogtreecommitdiff
path: root/kernel/include
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/kernel/filesystem/path.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/include/kernel/filesystem/path.hpp b/kernel/include/kernel/filesystem/path.hpp
index 976926f..298ac5f 100644
--- a/kernel/include/kernel/filesystem/path.hpp
+++ b/kernel/include/kernel/filesystem/path.hpp
@@ -3,6 +3,7 @@
#include <ranges>
#include <string_view>
+#include <kstd/string>
namespace kernel::filesystem::path
{
@@ -43,12 +44,12 @@ namespace kernel::filesystem::path
/**
@brief Splits the given path into its components.
@param path The path to split.
- @return A range of string views representing the components of the path.
+ @return A range of strings representing the components of the path.
*/
auto inline split(std::string_view path)
{
return std::views::split(path, '/') | std::views::filter([](auto const & part) { return !part.empty(); }) |
- std::views::transform([](auto const & part) { return std::string_view(part.begin(), part.end()); });
+ std::views::transform([](auto const & part) { return kstd::string(std::string_view(part.begin(), part.end())); });
}
} // namespace kernel::filesystem::path