Switch over to using TString to represent filesystem paths instead of TWideString. Fixed FileUtil not handling UTF-8 paths with Unicode characters correctly.

This commit is contained in:
Aruki
2017-05-04 15:43:25 -06:00
parent bdf0d188c3
commit e950634db2
38 changed files with 469 additions and 509 deletions

View File

@@ -66,11 +66,11 @@ void CExportGameDialog::InitUI(QString ExportDir)
ExportDir.replace('/', '\\');
TWideString DefaultNameMapPath = CAssetNameMap::DefaultNameMapPath(mGame);
if (!FileUtil::Exists(DefaultNameMapPath)) DefaultNameMapPath = L"";
TString DefaultNameMapPath = CAssetNameMap::DefaultNameMapPath(mGame);
if (!FileUtil::Exists(DefaultNameMapPath)) DefaultNameMapPath = "";
TWideString DefaultGameInfoPath = CGameInfo::GetDefaultGameInfoPath(mGame);
if (!FileUtil::Exists(DefaultGameInfoPath)) DefaultGameInfoPath = L"";
TString DefaultGameInfoPath = CGameInfo::GetDefaultGameInfoPath(mGame);
if (!FileUtil::Exists(DefaultGameInfoPath)) DefaultGameInfoPath = "";
mpUI->OutputDirectoryLineEdit->setText(ExportDir);
mpUI->AssetNameMapLineEdit->setText(TO_QSTRING(DefaultNameMapPath));