From 5390605797d2ec8db4c6eb81752cd6e6c1dc2fac Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Thu, 3 Dec 2015 10:23:19 +1100 Subject: [PATCH] Add v to front of version string in version->parse to force conversion of decimal to dotted decimal versions, and change from ge to > to prevent reapplying current version --- scripts/zmupdate.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zmupdate.pl.in b/scripts/zmupdate.pl.in index e9f4a2dc2..969c72cb6 100644 --- a/scripts/zmupdate.pl.in +++ b/scripts/zmupdate.pl.in @@ -1044,7 +1044,7 @@ if ( $version ) foreach my $patch ( @files ) { my ( $v ) = $patch =~ /^zm_update\-([\d\.]+)\.sql$/; #PP make sure we use version compare - if ( version->parse($v) ge version->parse($version) ) { + if ( version->parse('v' . $v) > version->parse('v' . $version) ) { print( "Upgrading DB to $v from $version\n" ); patchDB( $dbh, $v ); if ( $dbh->errstr() ) {