aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix')
-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 f932ca4f..cb7e6e3b 100644
--- a/toys/posix/cp.c
+++ b/toys/posix/cp.c
@@ -177,7 +177,7 @@ int cp_node(struct dirtree *try)
if (!faccessat(cfd, catch, F_OK, 0) && !S_ISDIR(cst.st_mode)) {
char *s;
- if (S_ISDIR(try->st.st_dev)) {
+ if (S_ISDIR(try->st.st_mode)) {
error_msg("dir at '%s'", s = dirtree_path(try, 0));
free(s);
return 0;