From 200cd6e877db5c2ef1fd6ba898a8293d1cc5bec4 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Tue, 31 Jan 2017 15:21:35 -0800 Subject: [PATCH] Update snapshots to use fs package Signed-off-by: Derek McGowan (github: dmcgowan) --- snapshot/naive/naive.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snapshot/naive/naive.go b/snapshot/naive/naive.go index b012c33..bf48583 100644 --- a/snapshot/naive/naive.go +++ b/snapshot/naive/naive.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/docker/containerd" - "github.com/docker/docker/pkg/archive" + "github.com/docker/containerd/fs" "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. - 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") } } @@ -88,7 +88,7 @@ func (n *Naive) Commit(diff, dst string) error { // 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. - 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") }