X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FLib.pm;h=0c4b69b075f9c21174c21852f3397afe9a33f9ef;hp=960c2220ea1b6507913f9e0630ef9c5e87ceb6d4;hb=c2b072c9ad558447fb73fedf0cad170214b7d80e;hpb=4cdaa6b8a9f5161ee2da4371d68cbbad41248ea0 diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm index 960c222..0c4b69b 100644 --- a/lib/BackupPC/Lib.pm +++ b/lib/BackupPC/Lib.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0beta0, released 11 Jul 2006. +# Version 3.0.0, released 28 Jan 2007. # # See http://backuppc.sourceforge.net. # @@ -94,7 +94,7 @@ sub new my $bpc = bless { %$paths, - Version => '3.0.0beta0', + Version => '3.0.0', }, $class; $bpc->{storage} = BackupPC::Storage->new($paths); @@ -1237,9 +1237,12 @@ sub compareLOGName if ( length($na) >= 5 && length($nb) >= 5 ) { # - # Both new style. Bigger numbers are more recent. + # Both new style: format is MMYYYY. Bigger dates are + # more recent. # - return $nb - $na; + my $ma = $2 * 12 + $1 if ( $na =~ /(\d+)(\d{4})/ ); + my $mb = $2 * 12 + $1 if ( $nb =~ /(\d+)(\d{4})/ ); + return $mb - $ma; } elsif ( length($na) >= 5 && length($nb) < 5 ) { return -1; } elsif ( length($na) < 5 && length($nb) >= 5 ) {