Skip to content

Commit

Permalink
Fix tar extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
litetex committed Sep 1, 2024
1 parent cb56404 commit ece54f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ADB/Java/JavaTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,10 @@ public static void ExtractTarGz(Stream stream, string outputDir)
using var memStr = new MemoryStream();
int read;
var buffer = new byte[chunk];
do
while ((read = gzip.Read(buffer, 0, buffer.Length)) > 0)
{
read = gzip.Read(buffer, 0, chunk);
memStr.Write(buffer, 0, read);
} while (read == chunk);
}

memStr.Seek(0, SeekOrigin.Begin);
ExtractTar(memStr, outputDir);
Expand Down

0 comments on commit ece54f0

Please sign in to comment.