package org.apache.solr.core;

import java.io.IOException;

import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.store.NIOFSDirectory;
import org.apache.lucene.util.Constants;

/**
 * Directory provider which mimics original Solr FSDirectory based behavior.
 * 
 */
public class StandardDirectoryFactory extends DirectoryFactory {

  public Directory open(String path) throws IOException {
    if (!Constants.WINDOWS) {
      return NIOFSDirectory.getDirectory(path);
    }

    return FSDirectory.getDirectory(path);
  }
}

@@ -24,16 +24,37 @@
 .core;%0A%0A
+import java.io.File;%0A
 import j
@@ -505,16 +505,20 @@
  return 
+new 
 NIOFSDir
@@ -523,34 +523,37 @@
 irectory
-.getDirectory(path
+(new File(path), null
 );%0A    %7D
@@ -565,16 +565,20 @@
  return 
+new 
 FSDirect
@@ -584,26 +584,29 @@
 tory
-.getDirectory(path
+(new File(path), null
 );%0A 

use public constructors to get Directory instances