lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1393832 - /lucene/dev/branches/branch_4x/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSegmentInfoWriter.java
Date Wed, 03 Oct 2012 23:40:40 GMT
Author: mikemccand
Date: Wed Oct  3 23:40:40 2012
New Revision: 1393832

URL: http://svn.apache.org/viewvc?rev=1393832&view=rev
Log:
delete file on exc during write

Modified:
    lucene/dev/branches/branch_4x/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSegmentInfoWriter.java

Modified: lucene/dev/branches/branch_4x/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSegmentInfoWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSegmentInfoWriter.java?rev=1393832&r1=1393831&r2=1393832&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSegmentInfoWriter.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSegmentInfoWriter.java
Wed Oct  3 23:40:40 2012
@@ -128,6 +128,10 @@ public class SimpleTextSegmentInfoWriter
     } finally {
       if (!success) {
         IOUtils.closeWhileHandlingException(output);
+        try {
+          dir.deleteFile(segFileName);
+        } catch (Throwable t) {
+        }
       } else {
         output.close();
       }



Mime
View raw message