That spooky error

time to read 1 min | 151 words

This code error with “file already exists”, figure out why :-)

public override IndexOutput CreateOutput(string name)
{
    transactionalStorage.Batch(actions =>
    {
        if (actions.FileExistsInDirectory(directory, name) == false) ;
            actions.CreateFileInDirectory(directory, name);
    });
    return OpenSession<IndexOutput>(name, true, (stream, action) => new EsentIndexOutput(stream, action));
}

Nasty, ain’t it?