Fixing hang in archive.CopyWithTar with invalid dst
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
This commit is contained in:
parent
831c2e7a7b
commit
f05813a1ea
2 changed files with 27 additions and 1 deletions
|
@ -910,7 +910,11 @@ func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) {
|
|||
}
|
||||
}()
|
||||
|
||||
return archiver.Untar(r, filepath.Dir(dst), nil)
|
||||
err = archiver.Untar(r, filepath.Dir(dst), nil)
|
||||
if err != nil {
|
||||
r.CloseWithError(err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// CopyFileWithTar emulates the behavior of the 'cp' command-line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue