Improve command shutdown on context cancellation

This commit is contained in:
Michael Eischer committed 2024-04-22 22:31:38 +02:00
1 parent 910927670f
commit 31624aeffd
17 files changed
+80 -6

No files matched your search

+3
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...)