Commit 2a51788
committed
rm: report permission denied for unreadable subdirectories
When rm -rf encounters a subdirectory without read permission,
handle_permission_denied attempts unlink_at on it. If that fails
with ENOTEMPTY, force mode was silently swallowing the error,
causing the parent removal to fail with a misleading
"Directory not empty" message instead.
Now always reports permission denied when we cannot open a
subdirectory and cannot remove it directly.
Fixes #109661 parent 7acacd0 commit 2a51788
2 files changed
+23
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
215 | 207 | | |
216 | 208 | | |
217 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1009 | 1025 | | |
1010 | 1026 | | |
1011 | 1027 | | |
| |||
0 commit comments