diff --git a/StabilityMatrix/Helper/ArchiveHelper.cs b/StabilityMatrix/Helper/ArchiveHelper.cs index 3e794b6b5..becaaccad 100644 --- a/StabilityMatrix/Helper/ArchiveHelper.cs +++ b/StabilityMatrix/Helper/ArchiveHelper.cs @@ -54,10 +54,9 @@ public static async Task AddToArchive7Z(string archivePath, string sourceDirecto public static async Task Extract7Z(string archivePath, string extractDirectory) { - var process = ProcessRunner.StartProcess(SevenZipPath, new[] - { - "x", archivePath, $"-o{ProcessRunner.Quote(extractDirectory)}", "-y" - }); + var args = + $"x {ProcessRunner.Quote(archivePath)} -o{ProcessRunner.Quote(extractDirectory)} -y"; + var process = ProcessRunner.StartProcess(SevenZipPath, args); await ProcessRunner.WaitForExitConditionAsync(process); var output = await process.StandardOutput.ReadToEndAsync(); var matches = Regex7ZOutput.Matches(output); @@ -85,10 +84,9 @@ public static async Task Extract7Z(string archivePath, string extra progress.Report(new ProgressReport(-1, isIndeterminate: true, type: ProgressType.Extract)); // Need -bsp1 for progress reports - var process = ProcessRunner.StartProcess(SevenZipPath, new[] - { - "x", archivePath, $"-o{ProcessRunner.Quote(extractDirectory)}", "-y", "-bsp1" - }, outputDataReceived: onOutput); + var args = + $"x {ProcessRunner.Quote(archivePath)} -o{ProcessRunner.Quote(extractDirectory)} -y -bsp1"; + var process = ProcessRunner.StartProcess(SevenZipPath, args, outputDataReceived: onOutput); await process.WaitForExitAsync();