GSRunner: Strip spaces from filenames

This commit is contained in:
Connor McLaughlin 2022-10-22 20:40:07 +10:00 committed by refractionpcsx2
parent 9daedf6f09
commit f5e64232c9
1 changed files with 2 additions and 2 deletions

View File

@ -461,7 +461,7 @@ static bool ParseCommandLineArgs(int argc, char* argv[], VMBootParameters& param
} }
else if (CHECK_ARG_PARAM("-dumpdir")) else if (CHECK_ARG_PARAM("-dumpdir"))
{ {
s_output_prefix = argv[++i]; s_output_prefix = StringUtil::StripWhitespace(argv[++i]);
if (s_output_prefix.empty()) if (s_output_prefix.empty())
{ {
Console.Error("Invalid dump directory specified."); Console.Error("Invalid dump directory specified.");
@ -559,7 +559,7 @@ static bool ParseCommandLineArgs(int argc, char* argv[], VMBootParameters& param
if (StringUtil::EndsWithNoCase(title, ".gs")) if (StringUtil::EndsWithNoCase(title, ".gs"))
title = Path::GetFileTitle(title); title = Path::GetFileTitle(title);
s_output_prefix = Path::Combine(s_output_prefix, title); s_output_prefix = Path::Combine(s_output_prefix, StringUtil::StripWhitespace(title));
Console.WriteLn(fmt::format("Saving dumps as {}_frameN.png", s_output_prefix)); Console.WriteLn(fmt::format("Saving dumps as {}_frameN.png", s_output_prefix));
} }