commit for moving to git

git-svn-id: svn://127.0.0.1/Perl/BackupPC-Backups-Info/trunk@986 0c1c3402-1be1-de11-8092-0022686faf23
This commit is contained in:
Zane C. B-H 2018-07-23 02:01:09 +00:00
parent fd5ceb542e
commit b14e0142dc
1 changed files with 25 additions and 3 deletions

View File

@ -120,11 +120,27 @@ sub get_dir{
Gets the last line parsed for a
If the machine has not been parsed yet, it will be and the last
entry returned.
Two options are taken.
The first is the machine in question.
The second is perl boolean if it should reread the file even if it already has a last.
my $lastRef=$bpcinfo->get_last($machine)
if ( $self->error ){
warn('something happened'.$self->errorstring);
}
=cut
sub get_last{
my $self=$_[0];
my $machine=$_[1];
my $force=$_[2];
if( ! $self->errorblank ){
return undef;
@ -144,9 +160,15 @@ sub get_last{
return undef;
}
$self->get_parsed( $machine );
if ( $self->error ){
return undef;
if (
(!defined( $self->{last}{ $machine } )) ||
$forced
){
$self->get_parsed( $machine );
if ( $self->error ){
return undef;
}
}
return $self->{last}{$machine};