File tree Expand file tree Collapse file tree 3 files changed +6300
-3
lines changed
lib/GLPI/Agent/Task/Inventory/MacOS
resources/macos/system_profiler Expand file tree Collapse file tree 3 files changed +6300
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ sub _getSoftwaresList {
55
55
$app -> {' Get Info String' } =~ / ^\S +, [A-Z]:\\ / ;
56
56
57
57
my $version = $app -> {' Version' };
58
+ # Cleanup dotted version from spaces
59
+ $version =~ s / \. / ./ g unless empty($version );
58
60
my $soft = {
59
61
NAME => $name ,
60
62
VERSION => $version ,
@@ -77,10 +79,10 @@ sub _getSoftwaresList {
77
79
if (grep { / \b Apple\b /i } @publisher ) {
78
80
$publisher = ' Apple' ;
79
81
} else {
80
- ($publisher ) = grep { / (\( C\) |\x{a9} |Copyright)/i } @publisher ;
82
+ ($publisher ) = grep { / (\( C\) |\x{a9} |Copyright| \x{ef}\x{bf}\x{bd} )/i } @publisher ;
81
83
unless (empty($publisher )) {
82
84
$publisher = $1 if $publisher =~ / \s by\s (.*)/i ;
83
- $publisher =~ s / .*(\( C\) |\x{a9} |Copyright)\s *// gi ;
85
+ $publisher =~ s / .*(\( C\) |\x{a9} |Copyright| \x{ef}\x{bf}\x{bd} )\s *// gi ;
84
86
$publisher =~ s /\s *All rights reserved\. ?\s *// i ;
85
87
$publisher =~ s /\s *Incorporated.*/ Inc./ i ;
86
88
$publisher =~ s /\s *Corporation.*// i ;
You can’t perform that action at this time.
0 commit comments