Преглед изворни кода

fs/file: Explicitly convert std::u8string to std::filesystem::path

Merry пре 2 година
родитељ
комит
5c398ede6f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/common/fs/file.h

+ 1 - 1
src/common/fs/file.h

@@ -37,7 +37,7 @@ void OpenFileStream(FileStream& file_stream, const std::filesystem::path& path,
 template <typename FileStream, typename Path>
 template <typename FileStream, typename Path>
 void OpenFileStream(FileStream& file_stream, const Path& path, std::ios_base::openmode open_mode) {
 void OpenFileStream(FileStream& file_stream, const Path& path, std::ios_base::openmode open_mode) {
     if constexpr (IsChar<typename Path::value_type>) {
     if constexpr (IsChar<typename Path::value_type>) {
-        file_stream.open(ToU8String(path), open_mode);
+        file_stream.open(std::filesystem::path{ToU8String(path)}, open_mode);
     } else {
     } else {
         file_stream.open(std::filesystem::path{path}, open_mode);
         file_stream.open(std::filesystem::path{path}, open_mode);
     }
     }