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. --- toys/posix/cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
-- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me as a reviewer.
From 58a1a03c00fb1cf85cf545f1b70c419f24d00a42 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <[email protected]> Date: Wed, 6 Jan 2016 08:38:46 -0800 Subject: [PATCH] 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. --- toys/posix/cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/posix/cp.c b/toys/posix/cp.c index f932ca4..cb7e6e3 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; -- 2.6.0.rc2.230.g3dd15c0
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
