Changeset 33403

Show
Ignore:
Timestamp:
12.08.2019 15:07:23 (10 days 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 modified

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