X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FLib.pm;h=faa66b187698a482988ae7df56fa01a472925a54;hp=12cb6e15de4417f7258fd07ae3d03887438366c3;hb=e4bf7ab080e172b74b3d64c196a72d0ff5d315c5;hpb=df717077755b9331fa245f72933ef03add7a3710 diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm index 12cb6e1..faa66b1 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.0beta3, released 3 Dec 2006. # # See http://backuppc.sourceforge.net. # @@ -94,7 +94,7 @@ sub new my $bpc = bless { %$paths, - Version => '3.0.0beta1', + Version => '3.0.0beta3', }, $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 ) {