Changeset 25501

Show
Ignore:
Timestamp:
27.04.2012 18:16:55 (7 years ago)
Author:
ak19
Message:

If the web/logs/tmp folder does not exist, the Java code that makes use of the folder (when an XSLT transformation fails) creates this folder.

Location:
main/trunk/greenstone3
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r25491 r25501  
    12091209    </exec> 
    12101210 
    1211     <delete> 
    1212       <fileset dir="${web.home}/logs/tmp" includes="**/*"/> 
    1213     </delete> 
     1211    <if> 
     1212      <bool><available file="${web.home}/logs/tmp" type="dir"/></bool> 
     1213      <delete> 
     1214    <fileset dir="${web.home}/logs/tmp" includes="**/*"/> 
     1215      </delete> 
     1216    </if> 
    12141217  </target> 
    12151218 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XMLTransformer.java

    r25445 r25501  
    444444        protected void performTransformWithPhysicalFiles() { 
    445445        File webLogsTmpFolder = new File(GlobalProperties.getGSDL3Home() + File.separator + "logs" + File.separator + "tmp"); 
     446        if(!webLogsTmpFolder.exists()) { 
     447            webLogsTmpFolder.mkdirs(); // create any necessary folders 
     448        } 
    446449        File styleFile = new File(webLogsTmpFolder + File.separator + "stylesheet" + XMLTransformer.debugFileCount + ".xml"); 
    447450        File sourceFile = new File(webLogsTmpFolder + File.separator + "source" + XMLTransformer.debugFileCount + ".xml");