Changeset 186

Show
Ignore:
Timestamp:
09/28/10 16:59:51 (4 years ago)
Author:
depesz
Message:

- fix problem with trailing / in datadir.

if datadir was provided with / at the end, it caused problem with finding out basename of datadir, which caused very misleading problem when making temporary directories.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/omnipitr/doc/changes.pod

    r185 r186  
    11=head1 OmniPITR 
     2 
     3=head2 2010-09-28 
     4 
     5=over 
     6 
     7=item * Fix error with handling master backups where given data-dir contained 
     8trailing / character 
     9 
     10=back 
     11 
    212 
    313=head2 2010-09-10 
  • trunk/omnipitr/lib/OmniPITR/Program/Backup/Master.pm

    r179 r186  
    375375 
    376376    $self->log->fatal( 'Data-dir was not provided!' ) unless defined $self->{ 'data-dir' }; 
     377    $self->{'data-dir'} =~ s{/+$}{}; 
    377378    $self->log->fatal( 'Provided data-dir (%s) does not exist!',   $self->{ 'data-dir' } ) unless -e $self->{ 'data-dir' }; 
    378379    $self->log->fatal( 'Provided data-dir (%s) is not directory!', $self->{ 'data-dir' } ) unless -d $self->{ 'data-dir' };