Merge pull request #2883 from ZYecho/fix-args

fix: use func args instead of build new one
This commit is contained in:
Michael Crosby 2018-12-17 14:27:32 -05:00 committed by GitHub
commit b62f3b6fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) { 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 { if err != nil {
return "", errors.Wrap(err, "failed to create temp dir") return "", errors.Wrap(err, "failed to create temp dir")
} }