@@ -54,10 +54,9 @@ public static async Task AddToArchive7Z(string archivePath, string sourceDirecto
54
54
55
55
public static async Task < ArchiveInfo > Extract7Z ( string archivePath , string extractDirectory )
56
56
{
57
- var process = ProcessRunner . StartProcess ( SevenZipPath , new [ ]
58
- {
59
- "x" , archivePath , $ "-o{ ProcessRunner . Quote ( extractDirectory ) } ", "-y"
60
- } ) ;
57
+ var args =
58
+ $ "x { ProcessRunner . Quote ( archivePath ) } -o{ ProcessRunner . Quote ( extractDirectory ) } -y";
59
+ var process = ProcessRunner . StartProcess ( SevenZipPath , args ) ;
61
60
await ProcessRunner . WaitForExitConditionAsync ( process ) ;
62
61
var output = await process . StandardOutput . ReadToEndAsync ( ) ;
63
62
var matches = Regex7ZOutput . Matches ( output ) ;
@@ -85,10 +84,9 @@ public static async Task<ArchiveInfo> Extract7Z(string archivePath, string extra
85
84
progress . Report ( new ProgressReport ( - 1 , isIndeterminate : true , type : ProgressType . Extract ) ) ;
86
85
87
86
// Need -bsp1 for progress reports
88
- var process = ProcessRunner . StartProcess ( SevenZipPath , new [ ]
89
- {
90
- "x" , archivePath , $ "-o{ ProcessRunner . Quote ( extractDirectory ) } ", "-y" , "-bsp1"
91
- } , outputDataReceived : onOutput ) ;
87
+ var args =
88
+ $ "x { ProcessRunner . Quote ( archivePath ) } -o{ ProcessRunner . Quote ( extractDirectory ) } -y -bsp1";
89
+ var process = ProcessRunner . StartProcess ( SevenZipPath , args , outputDataReceived : onOutput ) ;
92
90
93
91
await process . WaitForExitAsync ( ) ;
94
92
0 commit comments