Changeset 20911


Ignore:
Timestamp:
2009-11-05T15:14:05+13:00 (14 years ago)
Author:
ak19
Message:

Made a change that I think will help do a configure-web on Windows where the GSDLHOME path contains spaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/server/Server2.java

    r20618 r20911  
    8383    server_control_ = new Server2Control(this,frame_title);
    8484
    85     /* Make command tagets for managing Web server */
     85    /* Make command targets for managing Web server */
    8686    START_CMD     = "web-start";
    8787    RESTART_CMD   = "web-restart";
    88     CONFIGURE_CMD = "configure-web " + configfile;
     88    CONFIGURE_CMD = "configure-web \"" + configfile + "\"";
    8989    STOP_CMD      = "web-stop";
    9090
     
    378378    String lang = (args.length>=2) ? args[1] : "en";
    379379   
    380     // if no config file is given, then the following defaults to llssite.cfg
    381     String configfile = (args.length>=3 && args[2].startsWith("--config=")) ? args[2] : gsdl2_home+File.separator+"llssite.cfg";
     380    // if no config file is given, then it defaults to llssite.cfg (embedded in quotes to preserve spaces in the filepath)
     381    File defaultConfigFile = new File(gsdl2_dir, "llssite.cfg");
     382    String configfile = (args.length>=3 && args[2].startsWith("--config=")) ? args[2] : defaultConfigFile.getAbsolutePath();
     383        //"\""+defaultConfigFile.getAbsolutePath()+"\"";
     384        //"\""+gsdl2_home+File.separator+"llssite.cfg\"";
     385    gsdl2_dir = null;
     386    defaultConfigFile = null;
     387
    382388    int equalSign = configfile.indexOf('=');
    383389    if(equalSign != -1) {
Note: See TracChangeset for help on using the changeset viewer.