Commit b8e6379
committed
rm: don't suppress error messages if -f is used
Unlike every other rm(1) and contrary to the POSIX standard,
libcmd's rm suppresses all error messages (such as 'permission
denied') upon failure to unlink(2) or rmdir(2) if the -f/--force
option is used. This commit makes rm print its error messages
(except for 'not found') regardless of -f (state->force).
This commit also changes the error message 'directory not removed'
to 'directory not empty' which is more like GNU and BSD rm.1 parent 7886cdc commit b8e6379
2 files changed
+13
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
128 | 126 | | |
129 | | - | |
| 127 | + | |
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
| |||
136 | 134 | | |
137 | 135 | | |
138 | 136 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 137 | + | |
143 | 138 | | |
144 | 139 | | |
145 | 140 | | |
| |||
224 | 219 | | |
225 | 220 | | |
226 | 221 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 222 | + | |
231 | 223 | | |
232 | 224 | | |
233 | 225 | | |
234 | | - | |
235 | | - | |
236 | 226 | | |
237 | | - | |
| 227 | + | |
238 | 228 | | |
239 | 229 | | |
240 | 230 | | |
241 | 231 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 232 | + | |
246 | 233 | | |
247 | 234 | | |
248 | 235 | | |
| |||
308 | 295 | | |
309 | 296 | | |
310 | 297 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
| 298 | + | |
315 | 299 | | |
316 | 300 | | |
317 | 301 | | |
| |||
0 commit comments