Changeset 27715

Show
Ignore:
Timestamp:
27.06.2013 16:55:49 (6 years ago)
Author:
sjm84
Message:

Fixed some potential perl path errors

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java

    r27674 r27715  
    150150        sendMessage(new ConstructionEvent(this, GSStatus.INFO, "Collection construction: import collection.")); 
    151151        Vector<String> command = new Vector<String>(); 
    152         command.add(GlobalProperties.getProperty("perl.path", "perl") + "perl"); 
     152 
     153        String perlPath = GlobalProperties.getProperty("perl.path", "perl"); 
     154        if (perlPath.charAt(perlPath.length() - 1) != File.separatorChar) 
     155        { 
     156            perlPath = perlPath + File.separator; 
     157        } 
     158 
     159        command.add(perlPath + "perl"); 
    153160        command.add("-S"); 
    154161        command.add(GlobalProperties.getGS2Build() + File.separator + "bin" + File.separator + "script" + File.separator + "import.pl"); 
     
    179186        sendMessage(new ConstructionEvent(this, GSStatus.INFO, "Collection construction: build collection.")); 
    180187        Vector<String> command = new Vector<String>(); 
    181         command.add(GlobalProperties.getProperty("perl.path", "perl") + "perl"); 
     188 
     189        String perlPath = GlobalProperties.getProperty("perl.path", "perl"); 
     190        if (perlPath.charAt(perlPath.length() - 1) != File.separatorChar) 
     191        { 
     192            perlPath = perlPath + File.separator; 
     193        } 
     194 
     195        command.add(perlPath + "perl"); 
    182196        command.add("-S"); 
    183197        command.add(GlobalProperties.getGS2Build() + File.separator + "bin" + File.separator + "script" + File.separator + "buildcol.pl"); 
     
    242256        // sucessfully consistently during testing, whereas java at times is unable to delete it. 
    243257        Vector<String> command = new Vector<String>(); 
    244         command.add(GlobalProperties.getProperty("perl.path", "perl") + "perl"); 
     258 
     259        String perlPath = GlobalProperties.getProperty("perl.path", "perl"); 
     260        if (perlPath.charAt(perlPath.length() - 1) != File.separatorChar) 
     261        { 
     262            perlPath = perlPath + File.separator; 
     263        } 
     264 
     265        command.add(perlPath + "perl"); 
    245266        command.add("-S"); 
    246267        command.add(GlobalProperties.getGS2Build() + File.separator + "bin" + File.separator + "script" + File.separator + "activate.pl");