bug#7450: cp does not check for errno=EISDIR when target is
From:
Alan Curry
Subject:
bug#7450: cp does not check for errno=EISDIR when target is
Date:
Sun, 21 Nov 2010 16:07:10 -0500 (GMT+5)
Jim Meyering writes:
>
> Thanks for the suggestions.
> Here's the patch I'm considering:
> [I first patched copy.c's copy_reg, included at end,
> but didn't like that as much; the core copying code
> should not be encumbered like that, and other users of copy.c
> are not affected. ]
Cross-filesystem mv is pretty much the same. If one is confusing enough to
justify a change, I think the other is too.
$ cd /tmp
$ touch foo
$ ls -ld $HOME/nosuch
ls: cannot access /home/pacman/nosuch: No such file or directory
$ mv foo $HOME/nosuch/
mv: cannot create regular file `/home/pacman/nosuch/': Is a directory
$
--
Alan Curry