aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-09-25 18:06:36 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-09-25 18:06:36 +0000
commitea7645bab62c6f68c755cf717662bceaa04858ed (patch)
tree7d52e668bb6780bc822d5059e477ae4292463d6e
parent35465a3f005b99e25cea3cfa42a9de348976be8a (diff)
downloadbusybox-ea7645bab62c6f68c755cf717662bceaa04858ed.tar.gz
cp: -r and -R imply -d (coreutils compat)
-rw-r--r--coreutils/cp.c3
1 files changed, 2 insertions, 1 deletions
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;