Skip to content

Commit

Permalink
Reset prefix after manifest is written
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bryteise committed Apr 24, 2023
1 parent 06eb7af commit 0cf23ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions swupd/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 0cf23ce

Please sign in to comment.