diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-09-16 12:13:27 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-17 15:58:11 +0200 |
commit | 4db4befcb7f710cb9ec0dcc9968ee2d0b836a1c2 (patch) | |
tree | 33452de2bbae2d3d15dd719b63c8a5bb62441af1 /solenv | |
parent | a3fa7c4e04c489f8d8ec6db3385e965900d801a3 (diff) |
tdf#119897: "Version " prefix is optional
Hopefully this fixes the problem, which is being incorrect version written
for the font in MSI (1.0.0.0), and comparing with installed one (1.3), the
font is removed and not reinstalled.
Change-Id: Iee675e2c2b3f29c76e35dcf41bbcce9b6181bf62
Reviewed-on: https://gerrit.libreoffice.org/60548
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 38aae53a1004bb7393c81a98c7b370344613244e)
Reviewed-on: https://gerrit.libreoffice.org/60556
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/windows/file.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm index 43b2ef3e858f..081edde6db99 100644 --- a/solenv/bin/modules/installer/windows/file.pm +++ b/solenv/bin/modules/installer/windows/file.pm @@ -562,9 +562,9 @@ sub get_fileversion my $ttfdata = $fnt->{'name'}->read->find_name(5); $fnt->release; - if ($ttfdata =~ /Version ([0-9]+(\.[0-9]+)*)/i) + if ($ttfdata =~ /(Version )?([0-9]+(\.[0-9]+)*)/i) { - my ($version, $subversion, $microversion, $vervariant) = split(/\./,$1); + my ($version, $subversion, $microversion, $vervariant) = split(/\./,$2); $fileversion = int($version) . "." . int($subversion) . "." . int($microversion) . "." . int($vervariant); } else |