aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-02-19 17:28:52 -0600
committerRob Landley <rob@landley.net>2021-02-19 17:28:52 -0600
commite6207d5e0f42452e96c66a9173b3d17468629beb (patch)
treec8e3addc54c72513fd430843bbb52d2b9ace1bc0
parentc42089fed7adbf3ae1a0fd73b3a7b1e4f10e31db (diff)
downloadtoybox-e6207d5e0f42452e96c66a9173b3d17468629beb.tar.gz
Ethan Sommer pointed out that install -Dt needs -D marshalled to cp.
-rw-r--r--toys/posix/cp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c
index 56fbadf9..d7f2d934 100644
--- a/toys/posix/cp.c
+++ b/toys/posix/cp.c
@@ -478,6 +478,7 @@ void mv_main(void)
static inline int cp_flag_F(void) { return FLAG_F; };
static inline int cp_flag_p(void) { return FLAG_p; };
static inline int cp_flag_v(void) { return FLAG_v; };
+static inline int cp_flag_D(void) { return FLAG_D; };
// Switch to install's flag context
#define CLEANUP_cp
@@ -528,7 +529,7 @@ void install_main(void)
// Translate flags from install to cp
toys.optflags = cp_flag_F() + cp_flag_v()*!!FLAG(v)
- + cp_flag_p()*!!(FLAG(p)|FLAG(o)|FLAG(g));
+ + cp_flag_p()*!!(FLAG(p)|FLAG(o)|FLAG(g)) + cp_flag_D()*!!FLAG(D);
TT.callback = install_node;
cp_main();