X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FLib.pm;h=0c4b69b075f9c21174c21852f3397afe9a33f9ef;hp=12cb6e15de4417f7258fd07ae3d03887438366c3;hb=c2b072c9ad558447fb73fedf0cad170214b7d80e;hpb=df717077755b9331fa245f72933ef03add7a3710 diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm index 12cb6e1..0c4b69b 100644 --- a/lib/BackupPC/Lib.pm +++ b/lib/BackupPC/Lib.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0beta1, released 30 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.0beta1', + 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 ) {