Update snapshots to use fs package
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
574862fd89
commit
200cd6e877
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/docker/containerd"
|
"github.com/docker/containerd"
|
||||||
"github.com/docker/docker/pkg/archive"
|
"github.com/docker/containerd/fs"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ func (n *Naive) Prepare(dst, parent string) ([]containerd.Mount, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now, we copy the parent filesystem, just a directory, into dst.
|
// Now, we copy the parent filesystem, just a directory, into dst.
|
||||||
if err := archive.CopyWithTar(filepath.Join(parent, "data"), dst); err != nil { // note: src, dst args, ick!
|
if err := fs.CopyDirectory(dst, filepath.Join(parent, "data")); err != nil {
|
||||||
return nil, errors.Wrap(err, "copying of parent failed")
|
return nil, errors.Wrap(err, "copying of parent failed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ func (n *Naive) Commit(diff, dst string) error {
|
||||||
|
|
||||||
// Move the data into our metadata directory, we could probably save disk
|
// Move the data into our metadata directory, we could probably save disk
|
||||||
// space if we just saved the diff, but let's get something working.
|
// space if we just saved the diff, but let's get something working.
|
||||||
if err := archive.CopyWithTar(dst, filepath.Join(active.metadata, "data")); err != nil { // note: src, dst args, ick!
|
if err := fs.CopyDirectory(filepath.Join(active.metadata, "data"), dst); err != nil {
|
||||||
return errors.Wrap(err, "copying of parent failed")
|
return errors.Wrap(err, "copying of parent failed")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue