GNU bug report logs - #9170
[PATCH] cp "restores" permissions it never set

Previous Next

Package: coreutils;

Reported by: Eric Lammerts <eric <at> lammerts.org>

Date: Mon, 25 Jul 2011 19:49:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: 9170 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: bug#9170: [PATCH] cp "restores" permissions it never set
Date: Mon, 25 Jul 2011 15:21:33 -0600
On 07/25/2011 03:06 PM, Paul Eggert wrote:
> Thanks for the bug report.  I committed this patch:
>
> +++ b/src/copy.c
> @@ -2211,6 +2211,8 @@ copy_internal (char const *src_name, char const *dst_name,
>             if (x->verbose)
>               emit_verbose (src_name, dst_name, NULL);
>           }
> +      else
> +        omitted_permissions = 0;

This violates the style guide in HACKING; it should either be:

if (!cond)
  omitted_permissions = 0;
else
  {
    lots of lines
  }

or:

if (cond)
  {
     lots of lines
  }
else
  {
    omitted_permissions = 0;
  }

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




This bug report was last modified 13 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.