Create temp mount location manager

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2018-02-07 11:10:35 -05:00
parent 002cabade8
commit bc974a7a32
6 changed files with 124 additions and 54 deletions

View File

@@ -62,8 +62,8 @@ func (s *walkingDiff) Compare(ctx context.Context, lower, upper []mount.Mount, o
}
var ocidesc ocispec.Descriptor
if err := mount.WithTempMount(ctx, lower, func(lowerRoot string) error {
return mount.WithTempMount(ctx, upper, func(upperRoot string) error {
if err := mount.DefaultTempLocation.Mount(ctx, lower, func(lowerRoot string) error {
return mount.DefaultTempLocation.Mount(ctx, upper, func(upperRoot string) error {
var newReference bool
if config.Reference == "" {
newReference = true