mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-18 12:52:47 +01:00
Merge pull request #12724 from merryhime/fs-u8str-overloads
fs/file: Explicitly convert std::u8string to std::filesystem::path
This commit is contained in:
commit
61ce0088ae
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue