From 6e92acfda9029a10da236bd8bf73e184b75f4f4b Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 21 Oct 2024 23:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E5=8D=A0?= =?UTF-8?q?=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE/Util/OtherUtil.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/N_m3u8DL-RE/Util/OtherUtil.cs b/src/N_m3u8DL-RE/Util/OtherUtil.cs index 6435160..70855d3 100644 --- a/src/N_m3u8DL-RE/Util/OtherUtil.cs +++ b/src/N_m3u8DL-RE/Util/OtherUtil.cs @@ -146,10 +146,12 @@ namespace N_m3u8DL_RE.Util var deGzipFile = Path.ChangeExtension(filePath, ".dezip_tmp"); try { - await using var fileToDecompressAsStream = File.OpenRead(filePath); - await using var decompressedStream = File.Create(deGzipFile); - await using var decompressionStream = new GZipStream(fileToDecompressAsStream, CompressionMode.Decompress); - await decompressionStream.CopyToAsync(decompressedStream); + await using (var fileToDecompressAsStream = File.OpenRead(filePath)) + { + await using var decompressedStream = File.Create(deGzipFile); + await using var decompressionStream = new GZipStream(fileToDecompressAsStream, CompressionMode.Decompress); + await decompressionStream.CopyToAsync(decompressedStream); + }; File.Delete(filePath); File.Move(deGzipFile, filePath); }