Changeset 27623


Ignore:
Timestamp:
06/14/13 15:50:20 (8 years ago)
Author:
ak19
Message:

Using FileUtils::FileExists in place of minus-e for the same test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugin.pm

    r27303 r27623  
    129129    my $success=0;
    130130    foreach my $plugname (@check_list) {
    131     if (-e $plugname) {
     131    if (&FileUtils::fileExists($plugname)) {
    132132        # lets add perllib folder to INC
    133133          # check it isn't already there first [jmt12]
    134134        my ($perllibfolder) = $plugname =~ /^(.*[\/\\]perllib)[\/\\]plugins/;
    135         if (-d $perllibfolder)
     135        if (&FileUtils::directoryExists($perllibfolder))
    136136            {
    137137              my $found_perllibfolder = 0;
     
    285285    # the .kill file is a handy (if not very elegant) way of aborting
    286286    # an import.pl or buildcol.pl process
    287     if (-e &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, ".kill")) {
     287    if (&FileUtils::fileExists(&FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, ".kill"))) {
    288288    gsprintf($outhandle, "{plugin.kill_file}\n");
    289289    die "\n";
     
    316316    # the .kill file is a handy (if not very elegant) way of aborting
    317317    # an import.pl or buildcol.pl process
    318     if (-e &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, ".kill")) {
     318    if (&FileUtils::fileExists(&FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, ".kill"))) {
    319319    gsprintf($outhandle, "{plugin.kill_file}\n");
    320320    die "\n";
     
    367367    # the .kill file is a handy (if not very elegant) way of aborting
    368368    # an import.pl or buildcol.pl process
    369     if (-e &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, ".kill")) {
     369    if (&FileUtils::fileExists(&FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, ".kill"))) {
    370370    gsprintf($outhandle, "{plugin.kill_file}\n");
    371371    die "\n";
Note: See TracChangeset for help on using the changeset viewer.