[slf4j-dev] svn commit: r863 - slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter

jncharpin at slf4j.org jncharpin at slf4j.org
Fri Aug 3 15:28:03 CEST 2007


Author: jncharpin
Date: Fri Aug  3 15:28:03 2007
New Revision: 863

Modified:
   slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/Converter.java

Log:


Modified: slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/Converter.java
==============================================================================
--- slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/Converter.java	(original)
+++ slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/Converter.java	Fri Aug  3 15:28:03 2007
@@ -99,10 +99,6 @@
 	private File initDestination() {
 		System.out.println("dest " + destination);
 		File fileDest = new File(destination);
-		if (!fileDest.isDirectory()) {
-			System.out.println("dest path is not a valid source directory");
-			return null;
-		}
 		if (fileDest.exists()) {
 			if (delDestination) {
 				delete(fileDest);
@@ -110,6 +106,10 @@
 				System.out.println("Destination file already exists");
 			}
 		}
+		else if (!fileDest.mkdir()) {
+			System.out.println("dest path is not a valid source directory");
+			return null;
+		}
 		return fileDest;
 	}
 
@@ -139,7 +139,6 @@
 		String curentFileName = fsource.getAbsolutePath().substring(
 				source.length());
 		File fdest = new File(destination + "/" + curentFileName);
-		;
 		if (fsource.isDirectory()) {
 			File[] files = fsource.listFiles();
 			fdest.mkdir();



More information about the slf4j-dev mailing list