Changeset 15155

Show
Ignore:
Timestamp:
29.03.2008 18:12:44 (11 years ago)
Author:
ak19
Message:

When calling mkcol to create a new collection, no longer add empty string argument if -gs3mode not applicable. Empty string argument will cause problems when using Java's Process.exec with multi-arguments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java

    r14974 r15155  
    11191119    } 
    11201120    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "mkcol.pl"); 
    1121     command_parts_list.add((Gatherer.GS3) ? Utility.GS3MODE_ARGUMENT : "");// add '-gs3mode'  
     1121    if(Gatherer.GS3) { 
     1122        command_parts_list.add(Utility.GS3MODE_ARGUMENT); // add '-gs3mode'  
     1123    } 
    11221124 
    11231125    command_parts_list.add("-collectdir"); 
     
    11361138    // Run the mkcol.pl command 
    11371139    String[] command_parts = (String[]) command_parts_list.toArray(new String[0]); 
     1140    //for(int i = 0; i < command_parts.length; i++) { 
     1141    ///ystem.err.println("\""+command_parts[i]+"\""); 
     1142    //} 
    11381143     
    11391144    GShell process = new GShell(command_parts, GShell.NEW, COLLECT, this, null, GShell.GSHELL_NEW);