Merge pull request #17088 from Microsoft/sjw/archive_hang_fix
Fixing hang in archive.CopyFileWithTar with invalid dst
This commit is contained in:
commit
a45713d529
2 changed files with 27 additions and 1 deletions
|
@ -914,7 +914,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