On 22/11/10 02:54, Paul Eggert wrote:
> --- a/src/copy.c
> +++ b/src/copy.c
> @@ -603,6 +603,12 @@ copy_reg (char const *src_name, char const *dst_name,
>                  }
>              }
>          }
> +
> +      /* Improve quality of diagnostic when a nonexistent dst_name
> +         ends in a slash and open fails with errno == EISDIR.  */
> +      if (dest_desc < 0 && dest_errno == EISDIR
> +          && *dst_name && dst_name[strlen (dst_name) - 1] == '/')
> +        dest_errno = ENOTDIR;

I like this because it probably aligns more with other systems.
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=a16bee4f

I wonder should the Linux kernel also change?
I.E. should creat("nosuch/") and ftruncate("nosuch/")
return ENOTDIR rather than EISDIR ?
There are arguments for and against I suppose.

Closing the bug...

cheers,
Pádraig.



Reply via email to