aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/cp.c')
-rw-r--r--toys/posix/cp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c
index 283ee978..aecd1870 100644
--- a/toys/posix/cp.c
+++ b/toys/posix/cp.c
@@ -84,7 +84,7 @@ int cp_node(struct dirtree *try)
if (!dirtree_notdotdot(try)) return 0;
// If returning from COMEAGAIN, jump straight to -p logic at end.
- if (S_ISDIR(try->st.st_mode) && try->data == -1) {
+ if (S_ISDIR(try->st.st_mode) && try->again) {
fdout = try->extra;
err = 0;
} else {