diff options
author | Elliott Hughes <enh@google.com> | 2016-01-06 08:38:46 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-02-01 23:03:35 -0600 |
commit | 2554243d8872a5083ad2bbd019e2e513000df3c6 (patch) | |
tree | c60e321a7f51d661fcb99aa32a33e24f1b1d45cc /toys | |
parent | 8aee3e5b5e774e3d79951d240e08384590811ffc (diff) | |
download | toybox-2554243d8872a5083ad2bbd019e2e513000df3c6.tar.gz |
Fix directory test in cp.
Commit 3d33dd80f8cb931e293d7f64c44bc357fec11120 fixed a use of S_ISDIR
on st_dev rather than st_mode in find, but there was another instance
of the same error in cp.
Diffstat (limited to 'toys')
-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 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; |