File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,15 @@ foreach($iarEntry in $iarEntries) {
43
43
$iarEntry = $packageArchive.CreateEntry ($fullname )
44
44
45
45
if ($fullname.StartsWith (" files" )) {
46
- $writer = New-Object System.IO.StreamWriter($iarEntry.Open ())
47
46
$name = [System.IO.Path ]::GetFileName($fullname )
48
- $content = Get-Content - Path (Join-Path - Path " .\cli\_out" - ChildPath $name ) - Raw
49
- $writer.Write ($content )
50
- $writer.Dispose ()
51
- $writer.Close ()
47
+ $content = [System.IO.File ]::ReadAllBytes((Join-Path - Path " .\cli\_out" - ChildPath $name ))
48
+ $ms = New-Object System.IO.MemoryStream(, $content )
49
+ $zipStream = $iarEntry.Open ()
50
+ $ms.CopyTo ($zipStream )
51
+ $zipStream.Dispose ()
52
+ $zipStream.Close ()
53
+ $ms.Dispose ()
54
+ $ms.Close ()
52
55
}
53
56
}
54
57
You can’t perform that action at this time.
0 commit comments