Changeset 16969

Show
Ignore:
Timestamp:
22.08.2008 15:09:33 (11 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

Files:
1 modified

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);