~eadwardus/ecore

497e342ddd924e7633b3861ce13aed34026712b4 — Eduardo Francisco a month ago de01d7b
Fix cp behaviour to match POSIX spec
2 files changed, 9 insertions(+), 3 deletions(-)

M man/cp.1
M src/cp.c
M man/cp.1 => man/cp.1 +6 -3
@@ 46,9 46,12 @@ Preserve mode, timestamp and permissions.
Descend recursively through its directories arguments.
.El
.Pp
The default is as if the
.Fl P
option had been specified.
If
.Fl R
is given, the default is as if the
.Fl L
option had been specified. Otherwise, it defaults to
.Fl P .
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO

M src/cp.c => src/cp.c +3 -0
@@ 58,6 58,9 @@ main(int argc, char **argv)
	if (argc < 2)
		usage();

	if (!ropts)
		ropts = (opts & CP_RFLAG) ? C_FSPHY : C_FSLOG;

	--argc;
	dest = argv[argc];
	argv[argc] = nil;