"Alfred M. Szmidt" <[EMAIL PROTECTED]> wrote:
> This one got lost:
>
> 2002-08-17  Marcus Brinkmann  <[EMAIL PROTECTED]>
>
>         * src/copy.c (copy_internal): Fix author preservation code.

Thank you.
I'll apply it, but have one question:


> --- fileutils-4.1.10.old/src/copy.c     Fri Jun 21 14:07:40 2002
> +++ fileutils-4.1.10/src/copy.c Sat Aug 17 20:42:40 2002
> @@ -1517,11 +1517,17 @@ copy_internal (const char *src_path, con
>  #if HAVE_STRUCT_STAT_ST_AUTHOR
>    /* Preserve the st_author field.  */
>    {
> -    file_t file = getdport (dst_path);
> -    if (file_chauthor (file, src_sb.st_author))
> -      error (0, errno, _("failed to preserve authorship for %s"),
> -            quote (dst_path));
> -    mach_port_deallocate (mach_task_self (), file);
> +    file_t file = file_name_lookup (dst_path, O_NORW, 0);
> +    if (file == MACH_PORT_NULL)
> +      error (0, errno, _("failed to lookup file %s"), quote (dst_path));
> +    else
> +      {
> +       int err = file_chauthor (file, src_sb.st_author);
> +       if (err)
> +         error (0, err, _("failed to preserve authorship for %s"),
> +                quote (dst_path));

Should we really be using `err' (not errno) in the above call to error?


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to