[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in find's -size (+patch)

From: James Youngman
Subject: Re: Bug in find's -size (+patch)
Date: Mon, 7 Feb 2005 23:54:08 +0000
User-agent: Mutt/1.3.28i

On Mon, Feb 07, 2005 at 08:11:50AM +0000, James Youngman wrote:

> So, are you in effect advocating the following change?
>      case COMP_LT:
> -      if (f_val < pred_ptr->args.size.size)
> -     return (true);
> +      if (pred_ptr->args.size.blocksize > 1
> +       && (stat_buf->st_size % pred_ptr->args.size.blocksize != 0))
> +     return f_val <= pred_ptr->args.size.size; /* allow 1.5Mb file to match 
> -size -2M */
> +      else
> +     return f_val < pred_ptr->args.size.size;

Comparison against Solaris shows that this change would make GNU
findutils incompatible with it.  In the absence of a POSIX
interpretation indicating that either alternative is acceptable, I'm
going to leave the code as it is (i.e. not apply that patch).

That means that "-size -2M" will continue not to match 1.5Mb files, as
before, and that "-size -1" will continue not to match a 1-byte file.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]