Apache Lucene open-source search software
LUCENE-2180: change to FSDir.getDirectory
Michael McCandless270550cb8b40
diff --git a/src/java/org/apache/lucene/store/MMapDirectory.java b/src/java/org/apache/lucene/store/MMapDirectory.javaindex 0f29394651a..aaa805cbbd5 100644--- a/src/java/org/apache/lucene/store/MMapDirectory.java+++ b/src/java/org/apache/lucene/store/MMapDirectory.java@@ -401,7 +401,7 @@ public class MMapDirectory extends FSDirectory {@Overridepublic IndexInput openInput(String name, int bufferSize) throws IOException {ensureOpen();- File f = new File(getFile(), name);+ File f = new File(getDirectory(), name);RandomAccessFile raf = new RandomAccessFile(f, "r");try {return (raf.length() <= (long) maxBBuf)diff --git a/src/java/org/apache/lucene/store/NIOFSDirectory.java b/src/java/org/apache/lucene/store/NIOFSDirectory.javaindex 78d60a8a59d..50906fbf625 100644--- a/src/java/org/apache/lucene/store/NIOFSDirectory.java+++ b/src/java/org/apache/lucene/store/NIOFSDirectory.java@@ -64,7 +64,7 @@ public class NIOFSDirectory extends FSDirectory {@Overridepublic IndexInput openInput(String name, int bufferSize) throws IOException {ensureOpen();- return new NIOFSIndexInput(new File(getFile(), name), bufferSize, getReadChunkSize());+ return new NIOFSIndexInput(new File(getDirectory(), name), bufferSize, getReadChunkSize());}/** Creates an IndexOutput for the file with the given name. */