From 5c398ede6f2ac85655d0035a06b12a71b431bd3a Mon Sep 17 00:00:00 2001 From: Merry Date: Sat, 20 Jan 2024 17:46:30 +0000 Subject: [PATCH] fs/file: Explicitly convert std::u8string to std::filesystem::path --- src/common/fs/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/fs/file.h b/src/common/fs/file.h index 167c4d826..2e2396075 100644 --- a/src/common/fs/file.h +++ b/src/common/fs/file.h @@ -37,7 +37,7 @@ void OpenFileStream(FileStream& file_stream, const std::filesystem::path& path, template void OpenFileStream(FileStream& file_stream, const Path& path, std::ios_base::openmode open_mode) { if constexpr (IsChar) { - file_stream.open(ToU8String(path), open_mode); + file_stream.open(std::filesystem::path{ToU8String(path)}, open_mode); } else { file_stream.open(std::filesystem::path{path}, open_mode); }