dion 02/02/17 04:45:26 Modified: latka/src/java/org/apache/commons/latka Latka.java Log: Fixed bug 6102 Revision Changes Path 1.34 +9 -3 jakarta-commons/latka/src/java/org/apache/commons/latka/Latka.java Index: Latka.java =================================================================== RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/Latka.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- Latka.java 11 Feb 2002 23:33:23 -0000 1.33 +++ Latka.java 17 Feb 2002 12:45:26 -0000 1.34 @@ -105,9 +105,9 @@ * @see LatkaProperties * * @author Morgan Delagrange - * @author dIon Gillard + * @author <a href="mailto:[EMAIL PROTECTED]">dIon Gillard</a> * - * @version $Revision: 1.33 $ + * @version $Revision: 1.34 $ */ public class Latka { @@ -221,8 +221,14 @@ } File dir = new File("logs"); + // try to create logs directory. if it fails, then check to + // make sure it is there (may have existed before) and is writeable if (!dir.mkdirs()) { - throw new IOException("Unable to create logs directory"); + if (!dir.exists ()) { + throw new IOException("Unable to create logs directory"); + } else if (!dir.canWrite ()) { + throw new IOException("Unable to write to logs directory"); + } } SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMdd'-'HHmm"); Date currentTime_1 = new Date();
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>