From 7edc437df24217051f2ef822757da5c930cb8fb2 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Sat, 9 Jan 2021 13:40:57 +0000 Subject: [PATCH] formatting --- build/Program.cs | 2 +- src/SharpCompress/Common/Zip/ZipFilePart.cs | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build/Program.cs b/build/Program.cs index d4bf56d1..81ac2a91 100644 --- a/build/Program.cs +++ b/build/Program.cs @@ -56,7 +56,7 @@ class Program Run("dotnet", "build src/SharpCompress/SharpCompress.csproj -c Release"); }); - Target(Test, DependsOn(Build), ForEach("net5.0"), + Target(Test, DependsOn(Build), ForEach("net5.0"), framework => { IEnumerable GetFiles(string d) diff --git a/src/SharpCompress/Common/Zip/ZipFilePart.cs b/src/SharpCompress/Common/Zip/ZipFilePart.cs index ebe2338a..23fbaf24 100644 --- a/src/SharpCompress/Common/Zip/ZipFilePart.cs +++ b/src/SharpCompress/Common/Zip/ZipFilePart.cs @@ -98,17 +98,17 @@ namespace SharpCompress.Common.Zip return new PpmdStream(new PpmdProperties(props), stream, false); } case ZipCompressionMethod.WinzipAes: - { - ExtraData? data = Header.Extra.SingleOrDefault(x => x.Type == ExtraDataType.WinZipAes); - if (data is null) { - throw new InvalidFormatException("No Winzip AES extra data found."); - } - if (data.Length != 7) - { - throw new InvalidFormatException("Winzip data length is not 7."); - } - ushort compressedMethod = BinaryPrimitives.ReadUInt16LittleEndian(data.DataBytes); + ExtraData? data = Header.Extra.SingleOrDefault(x => x.Type == ExtraDataType.WinZipAes); + if (data is null) + { + throw new InvalidFormatException("No Winzip AES extra data found."); + } + if (data.Length != 7) + { + throw new InvalidFormatException("Winzip data length is not 7."); + } + ushort compressedMethod = BinaryPrimitives.ReadUInt16LittleEndian(data.DataBytes); if (compressedMethod != 0x01 && compressedMethod != 0x02) {