Skip to content

Commit

Permalink
Work around file path encoding issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fo76utils committed Dec 22, 2024
1 parent 092a3c8 commit 748f897
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Fixed hang on opening loose .bto and .btr files.
* Fixed the block types NiMeshPSysData and NiMeshParticleSystem being incorrectly filtered out by 'Block/Insert'.
* Fixed bug in checking vertex attribute flags for enabling the Skyrim multilayer parallax shader.
* Fixed issue with opening data paths that contain non-ASCII characters on Windows. Note that currently the paths need to be valid in the local 8-bit code page.

#### NifSkope-2.0.dev9-20241112

Expand Down
4 changes: 4 additions & 0 deletions src/gamemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ void GameManager::GameResources::init_archives()
ba2File = new BA2File();
for ( const auto & i : tmp ) {
try {
#ifdef Q_OS_WIN32
ba2File->loadArchivePath( i.toLocal8Bit().constData(), archiveFilterFuncTable[game] );
#else
ba2File->loadArchivePath( i.toStdString().c_str(), archiveFilterFuncTable[game] );
#endif
} catch ( NifSkopeError & e ) {
if ( !ignoreArchiveErrors )
QMessageBox::critical( nullptr, "NifSkope error", QString("Error opening resource path '%1': %2").arg(i).arg(e.what()) );
Expand Down

0 comments on commit 748f897

Please sign in to comment.