go.mod: github.com/Microsoft/hcsshim v0.10.0-rc.7
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
7
vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go
generated
vendored
7
vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go
generated
vendored
@@ -45,6 +45,8 @@ func ExportLayer(ctx context.Context, path string, exportFolderPath string, pare
|
||||
type LayerReader interface {
|
||||
// Next advances to the next file and returns the name, size, and file info
|
||||
Next() (string, int64, *winio.FileBasicInfo, error)
|
||||
// LinkInfo returns the number of links and the file identifier for the current file.
|
||||
LinkInfo() (uint32, *winio.FileIDInfo, error)
|
||||
// Read reads data from the current file, in the format of a Win32 backup stream, and
|
||||
// returns the number of bytes read.
|
||||
Read(b []byte) (int, error)
|
||||
@@ -67,6 +69,11 @@ func NewLayerReader(ctx context.Context, path string, parentLayerPaths []string)
|
||||
trace.StringAttribute("path", path),
|
||||
trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", ")))
|
||||
|
||||
if len(parentLayerPaths) == 0 {
|
||||
// This is a base layer. It gets exported differently.
|
||||
return newBaseLayerReader(path, span), nil
|
||||
}
|
||||
|
||||
exportPath, err := os.MkdirTemp("", "hcs")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user