Changeset 33403 for main


Ignore:
Timestamp:
2019-08-12T15:07:23+12:00 (5 years ago)
Author:
ak19
Message:

Mistake to do with launchdir in SafeProcess: if the environment for the process to be executed is null, it does not follow that the launchdir for that process would be null. Ought to handle the params separately.

Location:
main/trunk
Files:
2 edited

Legend:

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

    r31970 r33403  
    305305       
    306306       
    307         if(this.envp == null) {
     307        if(this.envp == null && this.dir == null) {
    308308        prcs = rt.exec(this.command_args);
    309         } else { // launch process using cmd str with env params       
    310 
     309        } else { // launch process using cmd str with env params and/or exec-dir
     310
     311        //if(this.envp != null) {
    311312        //log("Environment: ");
    312313        //for(int i = 0; i < envp.length; i++) {
    313314        //    log("\t" + envp[i]);
     315        //}
    314316        //}
    315317
  • main/trunk/greenstone3/src/java/org/greenstone/util/SafeProcess.java

    r31720 r33403  
    280280       
    281281       
    282         if(this.envp == null) {
     282        if(this.envp == null && this.dir == null) {
    283283        prcs = rt.exec(this.command_args);
    284         } else { // launch process using cmd str with env params       
     284        } else { // launch process using cmd str with env params and/or exec-dir
    285285       
    286286        if(this.dir == null) {
Note: See TracChangeset for help on using the changeset viewer.