[tpop3d-discuss] [PATCH] Lots of 'Index exists, but has some stale or corrupt data' messages

Martin Blapp mb at imp.ch
Thu, 10 Feb 2005 17:14:18 +0100 (CET)


Hi,

There is still a bug, truncate(indexfile,sizeof(index_signature)) should
be truncate(indexfile,sizeof(index_signature)-1)

> +
> +    /* Check for empty mail boxes and kill a stale indexfile */
> +    if ((stat(m->name, &sb) == 0) && (sb.st_size == 0))
> +       truncate(indexfile,sizeof(index_signature)-1);