diff options
Diffstat (limited to 'toys/posix/cp.c')
-rw-r--r-- | toys/posix/cp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c index ddbfe125..3b30f8a8 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -494,7 +494,7 @@ void install_main(void) if (flags & FLAG_d) { for (ss = toys.optargs; *ss; ss++) { - if (mkpathat(AT_FDCWD, *ss, 0777, 3)) perror_msg_raw(*ss); + if (mkpathat(AT_FDCWD, *ss, 0777, MKPATHAT_MKLAST | MKPATHAT_MAKE)) perror_msg_raw(*ss); if (flags & (FLAG_g|FLAG_o)) if (lchown(*ss, TT.uid, TT.gid)) perror_msg("chown '%s'", *ss); if (flags & FLAG_v) printf("%s\n", *ss); @@ -505,7 +505,7 @@ void install_main(void) if (toys.optflags & FLAG_D) { TT.destname = toys.optargs[toys.optc-1]; - if (mkpathat(AT_FDCWD, TT.destname, 0, 2)) + if (mkpathat(AT_FDCWD, TT.destname, 0, MKPATHAT_MAKE)) perror_exit("-D '%s'", TT.destname); if (toys.optc == 1) return; } |