Skip to content

Commit 5a30b47

Browse files
authored
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
1 parent 43aec47 commit 5a30b47

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

changes/23541-fileversion-fallback

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Added fallback to FileVersion on EXE installers when FileVersion is set but ProductVersion isn't to allow more custom packages to be uploaded

pkg/file/pe.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ func ExtractPEMetadata(tfr *fleet.TempFileReader) (*InstallerMetadata, error) {
7272
}
7373
if productVersion != "" {
7474
version = productVersion
75+
} else if strings.TrimSpace(e["FileVersion"]) != "" {
76+
version = strings.TrimSpace(e["FileVersion"])
7577
}
7678
}
7779
if name == "" && sfxName != "" {

0 commit comments

Comments
 (0)