bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] cp --update --preserve


From: Jim Meyering
Subject: Re: [PATCH] cp --update --preserve
Date: Fri, 16 Jan 2004 08:40:21 +0100

Paolo Montrasio <address@hidden> wrote:
> With this message I'm answering to both Jim and Paul at the same
> time because I don't want to split the thread.
>
> The patch proposed by Jim seems equivalent to my one, but
> 1) I might be wrong and

FYI, they're not equivalent.
The problem with your patch was here:

  -             if (x->update && MTIME_CMP (src_sb, dst_sb) <= 0)
  ...
  +                  preserve_update_test = x->update
  +                                               && MTIME_CMP (src_sb, dst_sb);
  +                }
  +              if (preserve_update_test <= 0)

That would work if the assignment RHS were substituted syntactically,
but it's not.

The latter `if' test ends up being equivalent to this:

  if ((x->update && MTIME_CMP (src_sb, dst_sb)) <= 0)

which does the wrong thing when x->update is true and MTIME_CMP > 0.

If that still doesn't make sense, apply your patch,
then run `make check'.  There are many failures.




reply via email to

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