From b399e2ef6d633c4976a88be45d759c3d30446c19 Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Sat, 18 Jul 2020 03:15:00 +1000 Subject: [PATCH] Don't lose Compare failure if aborting diff upload fails Signed-off-by: Paul "TBBle" Hampson --- diff/walking/differ.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff/walking/differ.go b/diff/walking/differ.go index 5ce35910c..7fc2691a1 100644 --- a/diff/walking/differ.go +++ b/diff/walking/differ.go @@ -99,8 +99,8 @@ func (s *walkingDiff) Compare(ctx context.Context, lower, upper []mount.Mount, o if err != nil { cw.Close() if newReference { - if err := s.store.Abort(ctx, config.Reference); err != nil { - log.G(ctx).WithField("ref", config.Reference).Warnf("failed to delete diff upload") + if abortErr := s.store.Abort(ctx, config.Reference); abortErr != nil { + log.G(ctx).WithError(abortErr).WithField("ref", config.Reference).Warnf("failed to delete diff upload") } } }