Apply suggestions from code review

Co-authored-by: Megamouse <studienricky89@googlemail.com>
This commit is contained in:
FlexBy420 2024-11-19 20:36:52 +01:00 committed by GitHub
parent 06f0097e1c
commit 41d2b94566
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1098,14 +1098,13 @@ int main(int argc, char** argv)
for (const QString& path : QStandardPaths::standardLocations(QStandardPaths::StandardLocation::TempLocation))
{
if (Emu.IsPathInsideDir(emu_dir, path.toStdString()))
{
report_fatal_error(fmt::format(
QObject::tr("RPCS3 should never be run from a temporary location!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%1").toStdString(),
QString::fromStdString(emu_dir).toStdString()));
return 1;
}
{
report_fatal_error(QObject::tr(
"RPCS3 should never be run from a temporary location!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%0").arg(QString::fromStdString(emu_dir)).toStdString());
return 1;
}
}
// Check nonsensical archive locations
@ -1114,11 +1113,13 @@ int main(int argc, char** argv)
if (emu_dir.find(expr) != umax)
{
report_fatal_error(fmt::format(
QObject::tr("RPCS3 should never be run from an archive!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%1")
.toStdString(),
QString::fromStdString(emu_dir).toStdString()));
{
report_fatal_error(QObject::tr(
"RPCS3 should never be run from an archive!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%0").arg(QString::fromStdString(emu_dir)).toStdString());
return 1;
}
return 1;
}
}