diff options
Diffstat (limited to 'toys/posix/cp.c')
-rw-r--r-- | toys/posix/cp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c index d73b7229..fdb7c8ae 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -119,7 +119,7 @@ int cp_node(struct dirtree *try) } else { // -d is only the same as -r for symlinks, not for directories - if (S_ISLNK(try->st.st_mode) & (flags & FLAG_d)) flags |= FLAG_r; + if (S_ISLNK(try->st.st_mode) && (flags & FLAG_d)) flags |= FLAG_r; // Detect recursive copies via repeated top node (cp -R .. .) or // identical source/target (fun with hardlinks). |