Do not allow running RPCS3 from Rar directories

This commit is contained in:
Megamouse 2023-12-19 21:19:23 +01:00
parent 90b6f5613e
commit 8b6fa32d12

View File

@ -1047,6 +1047,19 @@ int main(int argc, char** argv)
return 1;
}
}
// Check nonsensical archive locations
for (const std::string& expr : { "/Rar$" })
{
if (emu_dir.find(expr) != umax)
{
report_fatal_error(fmt::format(
"RPCS3 should never be run from an archive!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%s", emu_dir));
return 1;
}
}
}
// Set timerslack value for Linux. The default value is 50,000ns. Change this to just 1 since we value precise timers.