Fix kopia snapshot policy not work (#6739)

Signed-off-by: Ming <mqiu@vmware.com>
This commit is contained in:
qiuming
2023-09-01 16:21:43 +08:00
committed by GitHub
parent 0e5022254f
commit f26ec9043a

View File

@@ -245,7 +245,7 @@ func reportSnapshotStatus(manifest *snapshot.Manifest, policyTree *policy.Tree)
var errs []string
if ds := manifest.RootEntry.DirSummary; ds != nil {
for _, ent := range ds.FailedEntries {
policy := policyTree.DefinedPolicy()
policy := policyTree.EffectivePolicy()
if !(policy != nil && bool(*policy.ErrorHandlingPolicy.IgnoreUnknownTypes) && strings.Contains(ent.Error, fs.ErrUnknown.Error())) {
errs = append(errs, fmt.Sprintf("Error when processing %v: %v", ent.EntryPath, ent.Error))
}