Skip to content

Commit ece9f95

Browse files
committed
getFolderPath() supporting wide file paths on MSW
1 parent 7bc7549 commit ece9f95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cinder/app/msw/PlatformMsw.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ namespace {
213213

214214
fs::path PlatformMsw::getFolderPath( const fs::path &initialPath )
215215
{
216-
string result;
216+
fs::path result;
217217

218218
// Store wide string to ensure it stays alive for SHBrowseForFolder
219219
std::wstring initialPathWide = initialPath.wstring();
@@ -227,9 +227,9 @@ fs::path PlatformMsw::getFolderPath( const fs::path &initialPath )
227227
setInsideModalLoop( false );
228228
if( pidl ) {
229229
// get the name of the folder
230-
TCHAR path[MAX_PATH];
230+
wchar_t path[MAX_PATH];
231231
if( ::SHGetPathFromIDList( pidl, path ) ) {
232-
result = msw::toUtf8String( path );
232+
result = std::wstring( path );
233233
}
234234

235235
// free memory used

0 commit comments

Comments
 (0)