lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wu, Daniel" <...@sonypictures.com>
Subject RE: IOException on Windows XP -- Cannot delete deleteable
Date Tue, 04 Jan 2005 22:50:49 GMT
> Thanks -- could you please recreate that patch with the -u option so
that 
> the context is visible and then attach it to bug 32887
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=32887)?

The patch listed below.  Will attach it to the bug once I got my account
created.

C:\lucene-1.4.3\src\java\org\apache\lucene\index>diff -u
IndexWriter.java.orig IndexWriter.java
--- IndexWriter.java.orig       2005-01-04 12:31:38.807077200 -0800
+++ IndexWriter.java    2004-12-14 08:05:57.947083700 -0800
@@ -568,6 +568,11 @@
   }

   private final void writeDeleteableFiles(Vector files) throws
IOException {
+       if(files.size() < 1) {
+               if(directory.fileExists("deleteable"))
directory.deleteFile("deleteable");
+               if(directory.fileExists("deleteable.new"))
directory.deleteFile("deleteable.new");
+               return;
+       }
     OutputStream output = directory.createFile("deleteable.new");
     try {
       output.writeInt(files.size());



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message