From 8a4f4a51a4ae4dbd4bd6fea7ea4cc4cb73525d08 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Wed, 6 May 2026 15:30:25 -0500 Subject: [PATCH 1/2] Use wide strings with BSATK input paths --- src/previewbsa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/previewbsa.cpp b/src/previewbsa.cpp index e21df2f..f1e7ed4 100644 --- a/src/previewbsa.cpp +++ b/src/previewbsa.cpp @@ -134,7 +134,7 @@ QWidget* PreviewBsa::genBsaPreview(const QString& fileName, const QSize&) QLabel* infoLabel = new QLabel(); BSA::Archive arch; // bs_archive_auto is easier to use, but is less performant when // working with memory - BSA::EErrorCode res = arch.read(fileName.toLocal8Bit().constData(), true); + BSA::EErrorCode res = arch.read(fileName.toStdWString().c_str(), true); if ((res != BSA::ERROR_NONE) && (res != BSA::ERROR_INVALIDHASHES)) { log::error("invalid bsa '{}', error {}", fileName, res); infoLabel->setText("Unable to parse archive. Unrecognized format."); From e34914e7657d27f66b93a2141dae4b5f0c55d811 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Thu, 7 May 2026 11:30:17 -0500 Subject: [PATCH 2/2] Convert to filesystem path --- src/previewbsa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/previewbsa.cpp b/src/previewbsa.cpp index f1e7ed4..fbb15cd 100644 --- a/src/previewbsa.cpp +++ b/src/previewbsa.cpp @@ -134,7 +134,7 @@ QWidget* PreviewBsa::genBsaPreview(const QString& fileName, const QSize&) QLabel* infoLabel = new QLabel(); BSA::Archive arch; // bs_archive_auto is easier to use, but is less performant when // working with memory - BSA::EErrorCode res = arch.read(fileName.toStdWString().c_str(), true); + BSA::EErrorCode res = arch.read(fileName.toStdWString(), true); if ((res != BSA::ERROR_NONE) && (res != BSA::ERROR_INVALIDHASHES)) { log::error("invalid bsa '{}', error {}", fileName, res); infoLabel->setText("Unable to parse archive. Unrecognized format.");