From f383260a98be4d348ede45914126a42b9576ee5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=A1k?= Date: Thu, 1 May 2025 20:22:26 +0200 Subject: [PATCH] fix path handling in linux --- platform/file_access.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/file_access.cpp b/platform/file_access.cpp index 71d13d7..6a4981f 100644 --- a/platform/file_access.cpp +++ b/platform/file_access.cpp @@ -32,6 +32,8 @@ std::filesystem::path break_and_compose_path(std::string_view pathname, char sep // Vše ostatní relativně vůči current_path return std::filesystem::current_path() / utf8_to_path(pathname); + } else if (p == 0) { + return std::filesystem::current_path().root_path() / utf8_to_path(pathname); } return break_and_compose_path(pathname.substr(0, p), sep) / utf8_to_path(pathname.substr(p + 1));