On 20 November 2015 at 22:23, Pedrum Mohageri <ped...@gmail.com> wrote: > I suspect it was a control-c from command line (at least for me). Once it > gets corrupted (meaning a truncated file), it'll stay like that until a user > either removes the dir file and recreates the index. > > Signal handlers are tricky and have certain limitations (see below link). I > guess a quick fix could be to look for a zero byte dir file and remove it, > but I'd suggest fixing how the actual writes are being done. > > https://www.gnu.org/software/libc/manual/html_node/Nonreentrancy.html
I've committed a change that means if the length of the dir file is zero, it will be removed and a new one will be created.