Changeset 106

Show
Ignore:
Timestamp:
04/08/10 19:32:58 (4 years ago)
Author:
depesz
Message:

allow uppercase hex digits in segment names

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/omnipitr/lib/OmniPITR/Program/Archive.pm

    r105 r106  
    370370    } 
    371371 
    372     $self->log->fatal( 'Given segment name is not valid (%s)', $self->{ 'segment' } ) unless basename( $self->{ 'segment' } ) =~ m{\A[a-f0-9]{24}\z}; 
     372    $self->log->fatal( 'Given segment name is not valid (%s)', $self->{ 'segment' } ) unless basename( $self->{ 'segment' } ) =~ m{\A[a-fA-F0-9]{24}\z}; 
    373373    my $segment_file_name = $self->{ 'segment' }; 
    374374    $segment_file_name = File::Spec->catfile( $self->{ 'data-dir' }, $self->{ 'segment' } ) unless $self->{ 'segment' } =~ m{^/}; 
  • trunk/omnipitr/lib/OmniPITR/Program/Restore.pm

    r104 r106  
    122122    for my $file ( @content ) { 
    123123        $file =~ s/\Q$extension\E\z//; 
    124         next unless $file =~ m{\A[a-f0-9]{24}\z}; 
     124        next unless $file =~ m{\A[a-fA-F0-9]{24}\z}; 
    125125        next unless $file lt $last_important; 
    126126        push @too_old, $file; 
     
    401401    $self->log->fatal( 'Given data-dir (%s) is not valid', $self->{ 'data-dir' } ) unless -d $self->{ 'data-dir' } && -f File::Spec->catfile( $self->{ 'data-dir' }, 'PG_VERSION' ); 
    402402 
    403     $self->log->fatal( 'Given segment name is not valid (%s)', $self->{ 'segment' } ) unless $self->{ 'segment' } =~ m{\A[a-f0-9]{24}\z}; 
     403    $self->log->fatal( 'Given segment name is not valid (%s)', $self->{ 'segment' } ) unless $self->{ 'segment' } =~ m{\A[a-fA-F0-9]{24}\z}; 
    404404 
    405405    $self->log->fatal( 'Given source (%s) is not a directory', $self->{ 'source' }->{ 'path' } ) unless -d $self->{ 'source' }->{ 'path' };