@@ -148,16 +148,14 @@ void PathsTab::OnPathChanged(wxFileDirPickerEvent& evt)
148148 for (const auto & folder: configuration->getRequiredFolders () | std::ranges::views::values)
149149 if (folder->getID () == evt.GetId ())
150150 {
151- const auto validPath = commonItems::DoesFolderExist (path (commonItems::UTF16ToUTF8 ( evt.GetPath ().ToStdWstring () )));
151+ const auto validPath = commonItems::DoesFolderExist (path (evt.GetPath ().ToStdWstring ()));
152152 if (!validPath)
153153 {
154- Log (LogLevel::Error) << " Cannot access folder: " << commonItems::UTF16ToUTF8 (evt.GetPath ().ToStdWstring ())
155- << " - Onedrive and similar symlink folders are not supported!" ;
154+ Log (LogLevel::Error) << " Cannot access folder: " << evt.GetPath ().ToStdWstring () << " - Onedrive and similar symlink folders are not supported!" ;
156155 // Not bailing. We may not be able to access it but who knows, maybe converter can.
157156 }
158- const auto result = commonItems::UTF16ToUTF8 (evt.GetPath ().ToStdWstring ());
159- folder->setValue (result);
160- Log (LogLevel::Info) << folder->getName () << " set to: " << commonItems::UTF16ToUTF8 (evt.GetPath ().ToStdWstring ());
157+ folder->setValue (evt.GetPath ().ToStdWstring ());
158+ Log (LogLevel::Info) << folder->getName () << " set to: " << evt.GetPath ().ToStdWstring ();
161159 // Intermezzo for mod detection
162160 if (!configuration->getAutoGenerateModsFrom ().empty () && folder->getName () == configuration->getAutoGenerateModsFrom ())
163161 {
@@ -169,13 +167,11 @@ void PathsTab::OnPathChanged(wxFileDirPickerEvent& evt)
169167 for (const auto & file: configuration->getRequiredFiles () | std::ranges::views::values)
170168 if (file->getID () == evt.GetId ())
171169 {
172- if (!commonItems::DoesFileExist (path (commonItems::UTF16ToUTF8 ( evt.GetPath ().ToStdWstring () ))))
170+ if (!commonItems::DoesFileExist (path (evt.GetPath ().ToStdWstring ())))
173171 {
174- Log (LogLevel::Error) << " Cannot access file: " << commonItems::UTF16ToUTF8 (evt.GetPath ().ToStdWstring ())
175- << " - Onedrive and similar symlink folders are not supported!" ;
172+ Log (LogLevel::Error) << " Cannot access file: " << evt.GetPath ().ToStdWstring () << " - Onedrive and similar symlink folders are not supported!" ;
176173 }
177- auto result = commonItems::UTF16ToUTF8 (evt.GetPath ().ToStdWstring ());
178- file->setValue (result);
179- Log (LogLevel::Info) << file->getName () << " set to: " << commonItems::UTF16ToUTF8 (evt.GetPath ().ToStdWstring ());
174+ file->setValue (evt.GetPath ().ToStdWstring ());
175+ Log (LogLevel::Info) << file->getName () << " set to: " << evt.GetPath ().ToStdWstring ();
180176 }
181177}
0 commit comments