mirror of https://github.com/apache/lucene.git
delete file on exc during write
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1393833 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e04d7b8b9
commit
da1c35cf31
|
@ -128,6 +128,10 @@ public class SimpleTextSegmentInfoWriter extends SegmentInfoWriter {
|
|||
} finally {
|
||||
if (!success) {
|
||||
IOUtils.closeWhileHandlingException(output);
|
||||
try {
|
||||
dir.deleteFile(segFileName);
|
||||
} catch (Throwable t) {
|
||||
}
|
||||
} else {
|
||||
output.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue