freebsd-src/bin/cp
Dag-Erling Smørgrav dd286b0dc1 cp: Improved conformance when copying directories.
* When copying a directory, if the destination exists and is not a
  directory, we would previously emit an error message and exit.  The
  correct behavior according to POSIX is to emit an error message and
  continue without descending further into the source directory.

* When copying a directory, if the destination does not exist and we
  fail to create it, we would previously emit an error message and
  exit.  The correct behavior according to POSIX is to emit an error
  message and continue.  Whether to descend further into the source
  directory is explicitly left unspecified; GNU cp does not, which
  seems to me to be the safer and less surprising option, so let's not
  either.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44577
2024-04-01 19:29:31 +02:00
..
tests cp: Split the basic_symlink test case in two. 2023-12-14 17:06:57 +01:00
cp.1 cp: Correct the list of non-portable flags. 2024-04-01 19:29:31 +02:00
cp.c cp: Improved conformance when copying directories. 2024-04-01 19:29:31 +02:00
extern.h cp: Add -N flag, inspired by NetBSD's similar flag 2023-12-07 13:36:44 -07:00
Makefile bin: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
utils.c cp: Remove useless ssize_t cast 2024-03-21 11:43:04 -03:00