IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13491


Ignore:
Timestamp:
May 23, 2007, 2:16:08 PM (19 years ago)
Author:
Paul Price
Message:

Prevent failure when the directory already exists.

File:
1 edited

Legend:

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

    r13482 r13491  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.47 2007-05-23 01:24:21 price Exp $
     3# $Id: Config.pm,v 1.48 2007-05-24 00:16:08 price Exp $
    44
    55package PS::IPP::Config;
     
    390390    my $resolved = $self->convert_filename_absolute( $name );
    391391    my ( $vol, $dirs, $file ) = File::Spec->splitpath( $resolved );
    392     system "mkdir -p $dirs" or (carp "Can't create directory $dirs" and exit($PS_EXIT_DATA_ERROR));
     392    unless (-d $dirs) {
     393        system "mkdir -p $dirs" or (carp "Can't create directory $dirs" and exit($PS_EXIT_DATA_ERROR));
     394    }
    393395
    394396    return $name;
Note: See TracChangeset for help on using the changeset viewer.