Do not exec FEX if it is a folder

This commit is contained in:
wsxarcher committed 2026-06-28 17:28:41 +02:00
1 parent 78832cc0d0
commit 2ba35286ef
1 file changed
+2 -2
+2 -2
View File
@@ -53,14 +53,14 @@ int main(int argc, char** argv, char** const envp) {
// Check if a local FEX to FEXBash exists
// If it does then it takes priority over the installed one
if (!std::filesystem::exists(FEXPath)) {
if (!std::filesystem::is_regular_file(FEXPath)) {
std::error_code ec;
auto FEXBashPath = std::filesystem::read_symlink("/proc/self/exe", ec);
if (!ec) {
FEXPath = FEXBashPath.replace_filename("FEX");
}
if (!std::filesystem::exists(FEXPath)) {
if (!std::filesystem::is_regular_file(FEXPath)) {
fmt::print(stderr, "Could not locate FEX executable\n");
std::abort();
}