Changeset 31697


Ignore:
Timestamp:
2017-05-22T16:55:02+12:00 (5 years ago)
Author:
ak19
Message:

More changes to bring SafeProcess GLI src version and GS3 src version up to speed with each other

Location:
main/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/SafeProcess.java

    r31692 r31697  
    2222
    2323import java.lang.reflect.Field;
    24 //import java.lang.reflect.Method;
    2524
    2625import org.apache.log4j.*;
     
    897896    SafeProcess prcs = new SafeProcess("which " + program);     
    898897    prcs.runProcess();
    899     String output = prcs.getStdOutput();
     898    String output = prcs.getStdOutput().trim();
     899    ///System.err.println("*** 'which " + program + "' returned: |" + output + "|");
    900900    if(output.equals("")) {
     901        return false;
     902    } else if(output.indexOf("no "+program) !=-1) { // from GS3's org.greenstone.util.BrowserLauncher.java's isAvailable(program)
     903        log("@@@ SafeProcess.isAvailable(): " + program + "is not available");
    901904        return false;
    902905    }
  • main/trunk/greenstone3/src/java/org/greenstone/util/SafeProcess.java

    r31696 r31697  
    904904        return false;
    905905    }
     906    //System.err.println("*** 'which " + program + "' returned: " + output);
    906907    return true;
    907908    } catch (Exception exc) {
Note: See TracChangeset for help on using the changeset viewer.