Merge pull request #4628 from ambarve/lcow_fix_apply_trailing_data
Read trailing data from tar reader
This commit is contained in:
commit
be47c2dac0
@ -21,6 +21,7 @@ package lcow
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"time"
|
"time"
|
||||||
@ -163,6 +164,11 @@ func (s windowsLcowDiff) Apply(ctx context.Context, desc ocispec.Descriptor, mou
|
|||||||
}
|
}
|
||||||
outFile.Close()
|
outFile.Close()
|
||||||
|
|
||||||
|
// Read any trailing data
|
||||||
|
if _, err := io.Copy(ioutil.Discard, rc); err != nil {
|
||||||
|
return emptyDesc, err
|
||||||
|
}
|
||||||
|
|
||||||
err = security.GrantVmGroupAccess(layerPath)
|
err = security.GrantVmGroupAccess(layerPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return emptyDesc, errors.Wrapf(err, "failed GrantVmGroupAccess on layer vhd: %v", layerPath)
|
return emptyDesc, errors.Wrapf(err, "failed GrantVmGroupAccess on layer vhd: %v", layerPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user