Menu

#10 hard wired path separator

open
nobody
None
5
2013-01-10
2005-05-29
No

Version: 1.9.RC1-000-26May05

FSDirectory.CreateOutput and FSDirectory.OpenInput
methods contains hard wired \\ path separators. In
linux environment, this should be a problem. I
recommend to change it to Path.DirectorySeparatorChar,
because it is os independent.

public override IndexOutput CreateOutput(System.String
name)

{

return new FSIndexOutput(new
System.IO.FileInfo(directory.FullName +
System.IO.Path.DirectorySeparatorChar + name));

}

public override IndexInput OpenInput(System.String name)

{

return new FSIndexInput(new
System.IO.FileInfo(directory.FullName +
System.IO.Path.DirectorySeparatorChar + name));

}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB