Path field in infinipaint filepicker uses UTF8 on Windows
This commit is contained in:
parent
6839e529c1
commit
003a2d3757
1 changed files with 1 additions and 1 deletions
|
|
@ -540,7 +540,7 @@ void GUIManager::input_path(const std::string& id, std::filesystem::path* val, s
|
|||
push_id(id);
|
||||
insert_element<TextBox<std::filesystem::path>>()->update(*io, val,
|
||||
[&](const std::string& a) {
|
||||
std::filesystem::path toRet = std::filesystem::path(a);
|
||||
std::filesystem::path toRet = std::filesystem::path(std::u8string_view(reinterpret_cast<const char8_t*>(a.c_str()), a.length()));
|
||||
if(fileTypeRestriction != std::filesystem::file_type::none && std::filesystem::status(toRet).type() != fileTypeRestriction)
|
||||
return std::optional<std::filesystem::path>(std::nullopt);
|
||||
return std::optional<std::filesystem::path>(toRet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue