Skip to content

Commit

Permalink
fix(dotnet): improve forming dotnet package names
Browse files Browse the repository at this point in the history
Signed-off-by: Weston Steimel <[email protected]>
  • Loading branch information
westonsteimel committed Jan 31, 2024
1 parent 31e0fc3 commit 3263f11
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ var (
func findName(versionResources map[string]string) string {
// PE files found in the wild _not_ authored by Microsoft seem to use ProductName as a clear
// identifier of the software
nameFields := []string{"ProductName", "FileDescription", "InternalName", "OriginalFilename"}
nameFields := []string{"InternalName", "OriginalFilename", "ProductName", "FileDescription"}

if isMicrosoft(versionResources) {
// Microsoft seems to be consistent using the FileDescription, with a few that are blank and have
Expand All @@ -188,6 +188,9 @@ func findName(versionResources map[string]string) string {
if value == "" {
continue
}

value = strings.TrimSuffix(strings.ReplaceAll(value, " ", "."), ".dll")

return value
}

Expand Down

0 comments on commit 3263f11

Please sign in to comment.