IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14794


Ignore:
Timestamp:
Sep 7, 2007, 11:39:58 AM (19 years ago)
Author:
Paul Price
Message:

Ensuring scheme is defined before sucking it off.

File:
1 edited

Legend:

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

    r14792 r14794  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.68 2007-09-07 21:29:50 price Exp $
     3# $Id: Config.pm,v 1.69 2007-09-07 21:39:58 price Exp $
    44
    55package PS::IPP::Config;
     
    196196    carp "base is not inited" if not defined $base;
    197197    my $scheme = file_scheme($base); # The scheme, e.g., file://, path://
    198     $base =~ s|^$scheme:/*||;
     198    $base =~ s|^$scheme:/*|| if defined $scheme;
    199199
    200200    my $root = '';
     
    480480        if ($name =~ m|^/|) { return $name; }
    481481        # without a leading slash, this is an error
    482         carp "Programming error";
    483         exit($PS_EXIT_PROG_ERROR);
     482        carp "Relative file name provided: relative paths are not permitted.";
     483        exit($PS_EXIT_SYS_ERROR);
    484484    }
    485485
Note: See TracChangeset for help on using the changeset viewer.