IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 22, 2007, 3:24:21 PM (19 years ago)
Author:
Paul Price
Message:

Handling the return value of system calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Config/lib/PS/IPP/Config.pm

    r13459 r13482  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.46 2007-05-22 04:22:00 price Exp $
     3# $Id: Config.pm,v 1.47 2007-05-23 01:24:21 price Exp $
    44
    55package PS::IPP::Config;
     
    354354    $source = $self->file_resolve( $source );
    355355
    356     system "cp $source $target";
     356    system "cp $source $target" or (carp "Can't copy file $source to $target." and
     357                                    exit($PS_EXIT_DATA_ERROR));
     358    return 1;
    357359}
    358360
     
    388390    my $resolved = $self->convert_filename_absolute( $name );
    389391    my ( $vol, $dirs, $file ) = File::Spec->splitpath( $resolved );
    390     system "mkdir -p $dirs";
     392    system "mkdir -p $dirs" or (carp "Can't create directory $dirs" and exit($PS_EXIT_DATA_ERROR));
    391393
    392394    return $name;
Note: See TracChangeset for help on using the changeset viewer.