From a409cdc2bb2bb81459b7e719e2f068da165170cc Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Mon, 20 Jul 2020 20:04:54 +0300 Subject: [PATCH] fix tar.gz update --- home/control_update.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home/control_update.go b/home/control_update.go index 2870c5f6..5cd3787b 100644 --- a/home/control_update.go +++ b/home/control_update.go @@ -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()