Menu

#18 FSDirectory in 1.9RC does not work on Unix

open
nobody
None
5
2013-01-10
2005-09-13
xcountry9
No

I am using 1.9RC1

CreatOutput and OpenInput uses \ as a path separator. I
fixed it using Path.Combine:

public override IndexOutput
CreateOutput(System.String name)
{
return new FSIndexOutput(new
System.IO.FileInfo(System.IO.Path.Combine(directory.FullName,
name)));
}

    /// <summary>Returns a stream reading an existing

file. </summary>
public override IndexInput
OpenInput(System.String name)
{
return new FSIndexInput(new
System.IO.FileInfo(System.IO.Path.Combine(directory.FullName,
name)));
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB