Added extra logging to 7z extraction completion

This commit is contained in:
Justin Swanson 2019-12-22 00:27:57 -06:00
parent fb0bfe8e60
commit a7aaac425a
2 changed files with 12 additions and 2 deletions

View File

@ -204,9 +204,15 @@ namespace Wabbajack.Common
{
}
p.WaitForExit();
if (!p.WaitForExit(30000))
{
Utils.Status($"Extracting {name} - Taking a long time to exit.", alsoLog: true);
p.WaitForExit();
}
if (p.ExitCode == 0)
{
Utils.Log(new GenericInfo($"Extracted {Path.GetFileName(source)}"));
return;
}
Utils.Log(new _7zipReturnError(p.ExitCode, source, dest, p.StandardOutput.ReadToEnd()));

View File

@ -121,9 +121,13 @@ namespace Wabbajack.Common
}
}
public static void Status(string msg, int progress = 0)
public static void Status(string msg, int progress = 0, bool alsoLog = false)
{
WorkQueue.AsyncLocalCurrentQueue.Value?.Report(msg, progress);
if (alsoLog)
{
Utils.Log(msg);
}
}
/// <summary>