From cc0941cc9f249a766fe5aca0105f38ae05b01894 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Sun, 1 Feb 2026 11:35:54 -0700 Subject: [PATCH] Attempt to correct Linux appimage behavior. (#6215) Also make Windows rom search react to the set search path. --- soh/soh/Extractor/Extract.cpp | 3 ++- soh/soh/OTRGlobals.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/soh/soh/Extractor/Extract.cpp b/soh/soh/Extractor/Extract.cpp index b567f4c7c..f8e71d9c7 100644 --- a/soh/soh/Extractor/Extract.cpp +++ b/soh/soh/Extractor/Extract.cpp @@ -229,7 +229,8 @@ void Extractor::FilterRoms(std::vector& roms, RomSearchMode searchM void Extractor::GetRoms(std::vector& roms) { #ifdef _WIN32 WIN32_FIND_DATAA ffd; - HANDLE h = FindFirstFileA(".\\*", &ffd); + std::string search = std::string(mSearchPath + "\\*"); + HANDLE h = FindFirstFileA(search.c_str(), &ffd); do { if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index a56e59c20..ac3182eab 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -415,6 +415,7 @@ void OTRGlobals::RunExtract(int argc, char* argv[]) { std::atomic extractCount = 0, totalExtract = 0; std::string installPath = Ship::Context::GetAppBundlePath(); + std::string dataPath = Ship::Context::GetAppDirectoryPath(appShortName); std::string file; #if defined(__SWITCH__) @@ -632,6 +633,8 @@ void OTRGlobals::RunExtract(int argc, char* argv[]) { extract = Extractor(); extract.SetSearchPath(installPath); extract.GetRoms(args); + extract.SetSearchPath(dataPath); + extract.GetRoms(args); if (!args.empty()) { promptStep = PS_WAIT; SohGui::RegisterPopup(