IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2877


Ignore:
Timestamp:
Jan 3, 2005, 4:12:50 PM (22 years ago)
Author:
jhoblitt
Message:

add check for valid filehandles in copy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/lib/Nebulous/Client.pm

    r2875 r2877  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.5 2005-01-04 02:02:23 jhoblitt Exp $
     3# $Id: Client.pm,v 1.6 2005-01-04 02:12:50 jhoblitt Exp $
    44
    55package PS::IPP::IData::Client;
     
    542542
    543543    my $fh      = $self->open( $key, 'read' );
     544    unless ( $fh ) {
     545        $log->debug( "can not open object" );
     546        $log->debug( "leaving" );
     547
     548        return undef;
     549    }
     550
    544551    my $new_fh  = $self->create( $new_key );
     552    unless ( $new_fh ) {
     553        $log->debug( "can not open object" );
     554        $log->debug( "leaving" );
     555
     556        return undef;
     557    }
    545558
    546559    File::Copy::copy( $fh, $new_fh ) or $log->logdie( "can not copy object $key" );
Note: See TracChangeset for help on using the changeset viewer.