OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8aee3e5
)
Fix directory test in cp.
author
Elliott Hughes
<enh@google.com>
Wed, 6 Jan 2016 16:38:46 +0000
(08:38 -0800)
committer
Rob Landley
<rob@landley.net>
Tue, 2 Feb 2016 05:03:35 +0000
(23:03 -0600)
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
patch
|
blob
|
history
diff --git
a/toys/posix/cp.c
b/toys/posix/cp.c
index
f932ca4
..
cb7e6e3
100644
(file)
--- 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;