File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/NerdBank.GitVersioning/ManagedGit Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 55using System . Buffers ;
66using System . IO ;
77using System . IO . Compression ;
8+ using System . Linq ;
89using System . Threading ;
910using System . Threading . Tasks ;
1011
@@ -56,9 +57,9 @@ public ZLibStream(Stream stream, long length = -1)
5657 Span < byte > zlibHeader = stackalloc byte [ 2 ] ;
5758 stream . ReadAll ( zlibHeader ) ;
5859
59- if ( zlibHeader [ 0 ] != 0x78 || ( zlibHeader [ 1 ] != 0x01 && zlibHeader [ 1 ] != 0x9C ) )
60+ if ( zlibHeader [ 0 ] != 0x78 || ( zlibHeader [ 1 ] != 0x01 && zlibHeader [ 1 ] != 0x9C && zlibHeader [ 1 ] != 0x5E && zlibHeader [ 1 ] != 0xDA ) )
6061 {
61- throw new GitException ( ) ;
62+ throw new GitException ( $ "Invalid zlib header { string . Join ( " " , zlibHeader . ToArray ( ) . Select ( b => $ " { b : X2 } " ) ) } " ) ;
6263 }
6364 }
6465
You can’t perform that action at this time.
0 commit comments