From 5c314d9553401b3e7aad17e520ef62f11bca806e Mon Sep 17 00:00:00 2001 From: Lars Hanisch Date: Thu, 20 Oct 2022 13:00:20 +0200 Subject: [PATCH] fix(tar): use sync codepath on sync methods --- src/ICSharpCode.SharpZipLib/Tar/TarInputStream.cs | 2 +- src/ICSharpCode.SharpZipLib/Tar/TarOutputStream.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ICSharpCode.SharpZipLib/Tar/TarInputStream.cs b/src/ICSharpCode.SharpZipLib/Tar/TarInputStream.cs index 2a3864d6f..c87c48d32 100644 --- a/src/ICSharpCode.SharpZipLib/Tar/TarInputStream.cs +++ b/src/ICSharpCode.SharpZipLib/Tar/TarInputStream.cs @@ -531,7 +531,7 @@ public void Reset() /// /// The next TarEntry in the archive, or null. /// - public TarEntry GetNextEntry() => GetNextEntryAsync(CancellationToken.None, true).GetAwaiter().GetResult(); + public TarEntry GetNextEntry() => GetNextEntryAsync(CancellationToken.None, false).GetAwaiter().GetResult(); private async ValueTask GetNextEntryAsync(CancellationToken ct, bool isAsync) { diff --git a/src/ICSharpCode.SharpZipLib/Tar/TarOutputStream.cs b/src/ICSharpCode.SharpZipLib/Tar/TarOutputStream.cs index e7db12c76..be4f6cc79 100644 --- a/src/ICSharpCode.SharpZipLib/Tar/TarOutputStream.cs +++ b/src/ICSharpCode.SharpZipLib/Tar/TarOutputStream.cs @@ -381,7 +381,7 @@ private async Task PutNextEntryAsync(TarEntry entry, CancellationToken cancellat /// to the output stream before this entry is closed and the /// next entry written. /// - public void CloseEntry() => CloseEntryAsync(CancellationToken.None, true).GetAwaiter().GetResult(); + public void CloseEntry() => CloseEntryAsync(CancellationToken.None, false).GetAwaiter().GetResult(); private async Task CloseEntryAsync(CancellationToken cancellationToken, bool isAsync) {