It was tested on existing TestReuters - this test failed in release build on my 
box, if I deleted reuters-index folder from my temp.
It works after fix, of course.

You are right, fileStat could be optimized. On the other hand, as getDirectory 
probably isn't called often, we probably won't spare a lot of CPU and/or IO

Borek

> -----Original Message-----
> From: Veit Jahns [mailto:nuncupa...@googlemail.com]
> Sent: Thursday, September 30, 2010 8:57 AM
> To: clucene-developers@lists.sourceforge.net
> Subject: Re: [CLucene-dev] FSDirectory fixed
> 
> 2010/9/27 Kostka Bořivoj <kos...@tovek.cz>:
> > Exception CL_ERR_IO  "<path> not a directory" was (sometimes) thrown, if
> getDirectory is called with path to non-existing folder.
> > Wrong condition fixed.
> 
> Looks good to me. But I guess, Itamar will ask for a test case. ;)
> 
> By the way, fileStat will be called twice here. Can we optimise here a
> little bit by storing the return value in variable, so that fileStat
> has to be called only once?
> 
> > Does it make sense to create branch even for such small fix?
> 
> You are right. But on the other side, git is very flexible regarding
> the handling of branches. So I think, this is not a big deal. And
> after merging this branch into master, it can be easily deleted.
> 
> Veit
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> CLucene-developers mailing list
> CLucene-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/clucene-developers
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to