LUCENE-2180: change to FSDir.getDirectory

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@893957 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-12-26 10:43:35 +00:00
parent 2185962add
commit 270550cb8b
2 changed files with 2 additions and 2 deletions

View File

@ -401,7 +401,7 @@ public class MMapDirectory extends FSDirectory {
@Override
public 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)

View File

@ -64,7 +64,7 @@ public class NIOFSDirectory extends FSDirectory {
@Override
public 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. */