From 0cf23ce61062ea633c45b5c7d02709359cde78d3 Mon Sep 17 00:00:00 2001 From: William Douglas Date: Mon, 24 Apr 2023 14:36:44 -0700 Subject: [PATCH] Reset prefix after manifest is written As other mixer processes might use the manifests after they are written, reset the path to include the prefix once the manifest write is complete. Signed-off-by: William Douglas --- swupd/manifest.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/swupd/manifest.go b/swupd/manifest.go index 9ae79fd2..fd9c564c 100644 --- a/swupd/manifest.go +++ b/swupd/manifest.go @@ -401,6 +401,11 @@ func (m *Manifest) WriteManifest(w io.Writer) error { if err != nil { return fmt.Errorf("couldn't write Manifest.%s: %s", m.Name, err) } + for _, f := range m.Files { + // Reset the prefix as the manifest struct might be used by other + // mixer processes and needs to have the path prefix in those cases. + f.setPrefixFromModifier() + } return nil }