fix: use func args instead of build new one

Signed-off-by: zhangyue <zy675793960@yeah.net>
This commit is contained in:
zhangyue 2018-12-16 15:07:12 +08:00
parent c7e31f1c5e
commit 7b1e6f323a

View File

@ -426,7 +426,7 @@ func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
}
func (o *snapshotter) prepareDirectory(ctx context.Context, snapshotDir string, kind snapshots.Kind) (string, error) {
td, err := ioutil.TempDir(filepath.Join(o.root, "snapshots"), "new-")
td, err := ioutil.TempDir(snapshotDir, "new-")
if err != nil {
return "", errors.Wrap(err, "failed to create temp dir")
}