sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
Subject svn commit: r1032858 - in /incubator/sis/trunk: CHANGES.txt sis-core/src/main/java/org/apache/sis/storage/GeoRSSData.java sis-core/src/main/java/org/apache/sis/storage/QuadTreeWriter.java
Date Tue, 09 Nov 2010 06:18:28 GMT
Author: mattmann
Date: Tue Nov  9 06:18:27 2010
New Revision: 1032858

URL: http://svn.apache.org/viewvc?rev=1032858&view=rev
Log:
- fix for SIS-19 QTreeWriter and GeoRSSData.save don't check to make sure the directory exists
before creating data there

Modified:
    incubator/sis/trunk/CHANGES.txt
    incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/GeoRSSData.java
    incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/QuadTreeWriter.java

Modified: incubator/sis/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/sis/trunk/CHANGES.txt?rev=1032858&r1=1032857&r2=1032858&view=diff
==============================================================================
--- incubator/sis/trunk/CHANGES.txt (original)
+++ incubator/sis/trunk/CHANGES.txt Tue Nov  9 06:18:27 2010
@@ -2,6 +2,9 @@ Apache SIS Change Log
 ======================
 Release 0.1-incubating (Current Development)
 
+* SIS-19 QTreeWriter and GeoRSSData.save don't check to make sure 
+  the directory exists before creating data there (mattmann)
+
 * SIS-18 demo JSP has incorrect form get action set (mattmann)
 
 * SIS-17 Context params need override set to false (mattmann)

Modified: incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/GeoRSSData.java
URL: http://svn.apache.org/viewvc/incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/GeoRSSData.java?rev=1032858&r1=1032857&r2=1032858&view=diff
==============================================================================
--- incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/GeoRSSData.java (original)
+++ incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/GeoRSSData.java Tue
Nov  9 06:18:27 2010
@@ -20,6 +20,7 @@ package org.apache.sis.storage;
 //JDK imports
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.FileWriter;
@@ -105,6 +106,7 @@ public class GeoRSSData implements QuadT
 	 */
 	public void saveToFile(Item item, GeoRSSModule geoRSSModule,
 			String directory) {
+	  if(!new File(directory).exists()) new File(directory).mkdirs();
 		try {
 			BufferedWriter writer = new BufferedWriter(new FileWriter(directory
 					+ filename));

Modified: incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/QuadTreeWriter.java
URL: http://svn.apache.org/viewvc/incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/QuadTreeWriter.java?rev=1032858&r1=1032857&r2=1032858&view=diff
==============================================================================
--- incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/QuadTreeWriter.java
(original)
+++ incubator/sis/trunk/sis-core/src/main/java/org/apache/sis/storage/QuadTreeWriter.java
Tue Nov  9 06:18:27 2010
@@ -19,6 +19,7 @@ package org.apache.sis.storage;
 
 //JDK imports
 import java.io.BufferedWriter;
+import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 
@@ -41,6 +42,7 @@ public class QuadTreeWriter {
   }
 
   private static void writeTreeConfigsToFile(QuadTree tree, String directory) {
+    if(!new File(directory).exists()) new File(directory).mkdirs();
     try {
       BufferedWriter writer = new BufferedWriter(new FileWriter(directory
           + "tree_config.txt"));



Mime
View raw message