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 2959f67c..df8269f3 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -340,9 +340,9 @@ void cp_main(void) // Skip nonexistent sources if (rc) { - int symfollow = toys.optflags & (FLAG_H|FLAG_L); + int symfollow = DIRTREE_SYMFOLLOW*!!(toys.optflags & (FLAG_H|FLAG_L)); - if (errno != EXDEV || !(new = dirtree_add_node(0, src, symfollow))) + if (errno != EXDEV || !(new = dirtree_start(src, symfollow))) perror_msg("bad '%s'", src); else dirtree_handle_callback(new, TT.callback); } |