Fall back to FileVersion when an EXE installer has FileVersion but not ProductVersion (#25070)

For #23541

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
This commit is contained in:
Ian Littman 2024-12-31 14:28:15 -06:00 committed by GitHub
parent 43aec4722e
commit 5a30b477c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -0,0 +1 @@
* Added fallback to FileVersion on EXE installers when FileVersion is set but ProductVersion isn't to allow more custom packages to be uploaded

View file

@ -72,6 +72,8 @@ func ExtractPEMetadata(tfr *fleet.TempFileReader) (*InstallerMetadata, error) {
}
if productVersion != "" {
version = productVersion
} else if strings.TrimSpace(e["FileVersion"]) != "" {
version = strings.TrimSpace(e["FileVersion"])
}
}
if name == "" && sfxName != "" {