diff options
author | Ron Yorston <rmy@pobox.com> | 2015-10-13 14:45:51 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-10-13 14:45:51 +0100 |
commit | 8e509f11bceeec419abc718300bef7422d1fee4c (patch) | |
tree | fdfbc752ad94102e3613a5d7254f14a93eaf7f56 /findutils | |
parent | 420f5edfe7676fe6e7cddbbf15c04649d096e422 (diff) | |
parent | 4d0c1ea4784c9844f8468d97ca5c26d3c70f9921 (diff) | |
download | busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.tar.gz busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.tar.bz2 busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'findutils')
-rw-r--r-- | findutils/find.c | 8 | ||||
-rw-r--r-- | findutils/xargs.c | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/findutils/find.c b/findutils/find.c index ced8922e7..bd7ccc323 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
@@ -768,7 +768,10 @@ ACTF(delete) | |||
768 | { | 768 | { |
769 | int rc; | 769 | int rc; |
770 | if (S_ISDIR(statbuf->st_mode)) { | 770 | if (S_ISDIR(statbuf->st_mode)) { |
771 | rc = rmdir(fileName); | 771 | /* "find . -delete" skips rmdir(".") */ |
772 | rc = 0; | ||
773 | if (NOT_LONE_CHAR(fileName, '.')) | ||
774 | rc = rmdir(fileName); | ||
772 | } else { | 775 | } else { |
773 | rc = unlink(fileName); | 776 | rc = unlink(fileName); |
774 | } | 777 | } |
@@ -1261,7 +1264,8 @@ static action*** parse_params(char **argv) | |||
1261 | ap->perm_char = arg1[0]; | 1264 | ap->perm_char = arg1[0]; |
1262 | arg1 = (arg1[0] == '/' ? arg1+1 : plus_minus_num(arg1)); | 1265 | arg1 = (arg1[0] == '/' ? arg1+1 : plus_minus_num(arg1)); |
1263 | /*ap->perm_mask = 0; - ALLOC_ACTION did it */ | 1266 | /*ap->perm_mask = 0; - ALLOC_ACTION did it */ |
1264 | if (!bb_parse_mode(arg1, &ap->perm_mask)) | 1267 | ap->perm_mask = bb_parse_mode(arg1, ap->perm_mask); |
1268 | if (ap->perm_mask == (mode_t)-1) | ||
1265 | bb_error_msg_and_die("invalid mode '%s'", arg1); | 1269 | bb_error_msg_and_die("invalid mode '%s'", arg1); |
1266 | } | 1270 | } |
1267 | #endif | 1271 | #endif |
diff --git a/findutils/xargs.c b/findutils/xargs.c index 1ca136128..dba74ea61 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
@@ -125,7 +125,7 @@ static int xargs_exec(void) | |||
125 | return 124; | 125 | return 124; |
126 | } | 126 | } |
127 | if (status >= 0x180) { | 127 | if (status >= 0x180) { |
128 | bb_error_msg("%s: terminated by signal %d", | 128 | bb_error_msg("'%s' terminated by signal %d", |
129 | G.args[0], status - 0x180); | 129 | G.args[0], status - 0x180); |
130 | return 125; | 130 | return 125; |
131 | } | 131 | } |