Changeset 16969


Ignore:
Timestamp:
2008-08-22T15:09:33+12:00 (13 years ago)
Author:
kjdon
Message:

check that GSDLCOLLECTDIR is defined before using it in locate_config_files. Sometimes (eg when exploding) we are not in the context of a collection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/util.pm

    r16442 r16969  
    906906    else {
    907907    # Check for collection specific one before looking in global GSDL 'etc'
    908 
    909     my $test_collect_etc_filename
    910         = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"etc", $file);
    911 
    912     if (-e $test_collect_etc_filename) {
    913         push(@locations,$test_collect_etc_filename);
    914     }
    915 
     908    if (defined $ENV{'GSDLCOLLECTDIR'} && $ENV{'GSDLCOLLECTDIR'} ne "") {
     909        my $test_collect_etc_filename
     910        = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"etc", $file);
     911       
     912        if (-e $test_collect_etc_filename) {
     913        push(@locations,$test_collect_etc_filename);
     914        }
     915    }
    916916    my $test_main_etc_filename
    917917        = &util::filename_cat($ENV{'GSDLHOME'},"etc", $file);
Note: See TracChangeset for help on using the changeset viewer.