This commit is contained in:
2025-12-18 01:23:41 -05:00
parent 09cfaf9af8
commit d6fab7c738

View File

@@ -116,8 +116,18 @@ namespace anm2ed
command += " 2>&1"; command += " 2>&1";
#if _WIN32 #if _WIN32
command = "powershell -Command '& " + command + " | Tee-Object -FilePath " + auto script = std::string("& ") + command + " | Tee-Object -FilePath " + string::quote(ffmpegTempPathString) +
string::quote(ffmpegTempPathString) + " -Append'"; " -Append";
auto scriptEscaped = std::string();
scriptEscaped.reserve(script.size() * 2);
for (auto character : script)
{
if (character == '"')
scriptEscaped += "\"\"";
else
scriptEscaped += character;
}
command = "powershell -Command \"" + scriptEscaped + "\"";
#else #else
command += " | tee -a " + string::quote(loggerPathString); command += " | tee -a " + string::quote(loggerPathString);
#endif #endif