# HG changeset patch # User Isaac Dunham # Date 1411063521 18000 # Node ID 44e72a07fedcab660a8ab222ff4ac372b337d89a # Parent c0c91437138bea5563235c9f26bf0e30402e72fe rm -rf needs to chmod directories to u+rwx, because directories need +x to search. (Fixes messages about not being able to delete directories when running make test). diff -r c0c91437138b -r 44e72a07fedc toys/posix/rm.c --- a/toys/posix/rm.c Thu Sep 18 11:47:42 2014 -0500 +++ b/toys/posix/rm.c Thu Sep 18 13:05:21 2014 -0500 @@ -49,7 +49,7 @@ if (dir) { // Handle chmod 000 directories when -f if (faccessat(fd, try->name, R_OK, AT_SYMLINK_NOFOLLOW)) { - if (toys.optflags & FLAG_f) wfchmodat(fd, try->name, 0600); + if (toys.optflags & FLAG_f) wfchmodat(fd, try->name, 0700); else goto skip; } if (!try->again) return DIRTREE_COMEAGAIN;