Improve command shutdown on context cancellation

This commit is contained in:
Michael Eischer
2024-03-30 00:19:58 +01:00
parent 910927670f
commit 31624aeffd
17 changed files with 80 additions and 6 deletions

View File

@@ -320,6 +320,9 @@ func (mi *MasterIndex) Save(ctx context.Context, repo restic.Repository, exclude
newIndex = NewIndex()
}
}
if wgCtx.Err() != nil {
return wgCtx.Err()
}
}
err := newIndex.AddToSupersedes(extraObsolete...)