mirror of https://github.com/apache/lucene.git
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:
parent
2185962add
commit
270550cb8b
|
@ -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)
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue