From ea7645bab62c6f68c755cf717662bceaa04858ed Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 25 Sep 2007 18:06:36 +0000 Subject: cp: -r and -R imply -d (coreutils compat) --- coreutils/cp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'coreutils/cp.c') diff --git a/coreutils/cp.c b/coreutils/cp.c index 889e4604d..046067f35 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c @@ -44,8 +44,9 @@ int cp_main(int argc, char **argv) // Soft- and hardlinking don't mix // -P and -d are the same (-P is POSIX, -d is GNU) // -r and -R are the same + // -R (and therefore -r) switches on -d (coreutils does this) // -a = -pdR - opt_complementary = "-2:l--s:s--l:Pd:rR:apdR"; + opt_complementary = "-2:l--s:s--l:Pd:rRd:Rd:apdR"; flags = getopt32(argv, FILEUTILS_CP_OPTSTR "arPHL"); argc -= optind; argv += optind; -- cgit v1.2.3