fix tar.gz update

This commit is contained in:
Andrey Meshkov 2020-07-20 20:04:54 +03:00
parent e0aa24e2b7
commit a409cdc2bb
1 changed files with 3 additions and 2 deletions

View File

@ -377,7 +377,8 @@ func targzFileUnpack(tarfile, outdir string) ([]string, error) {
continue
}
fn := filepath.Join(outdir, path.Base(header.Name))
filename := path.Base(header.Name)
fn := filepath.Join(outdir, filename)
if header.Typeflag == tar.TypeDir {
log.Tracef("%s: ignoring directory", fn)
@ -401,7 +402,7 @@ func targzFileUnpack(tarfile, outdir string) ([]string, error) {
_ = f.Close()
log.Tracef("created file %s", fn)
files = append(files, header.Name)
files = append(files, filename)
}
_ = gzReader.Close()