mirror of
https://github.com/SAP/jenkins-library.git
synced 2026-06-19 22:58:55 +02:00
fix (untar) correct condition for gunzip file (#3679)
* debug if file is gzipped * looking 3 byte value * debug for gzip file * reading decimal values instead of hexadecimal * looking for byte values * modifying return * simplyfying conditions * correcting err condition * trying with hex * using hex Co-authored-by: anilkeshav27 <you@example.com> Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
co-authored by
anilkeshav27
Oliver Nocon
parent
276844e6a2
commit
e8fc08e43b
@@ -239,7 +239,7 @@ func Untar(src string, dest string, stripComponentLevel int) error {
|
||||
fmt.Errorf("unable to open src: %v", err)
|
||||
}
|
||||
|
||||
if b, err := isFileGzipped(src); err != nil && b {
|
||||
if b, err := isFileGzipped(src); err == nil && b {
|
||||
zr, err := gzip.NewReader(file)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user