According to the svn history, that bug was fixed at 2007-08-11

DIGY

-----Original Message-----
From: Debajyoti Bera [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 23, 2008 6:13 AM
To: lucene-net-user@incubator.apache.org
Subject: IndexReader.IndexExists bug

Hi,
        I spotted this error in IndexReader.IndexExists in Lucene.Net-2.1. Not 
sure 
if this is already fixed in trunk.
        
public static bool IndexExists(System.IO.FileInfo directory)
{
  return 
SegmentInfos.GetCurrentSegmentGeneration(System.IO.Directory.GetFileSystemEntries(directory.FullName))
 != - 
1;
}

The above method uses Directory.GetFileSystemEntries which returns full path 
of the directory contents, whereas GetCurrentSegmentGeneration expects only 
names of the directory contents. As it is, IndexReader.IndexExists() will 
return false even for valid indexes.

- dBera

-- 
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user

Reply via email to