Commit 31b5cc1
fix(shred): stop immediately on write errors (fixes #7947)
Replace show_if_err!() with ? operator in wipe_file() to properly
propagate errors and stop pass loop on first write failure.
This matches GNU shred behavior where any write error (disk quota,
I/O error, etc.) stops execution immediately instead of continuing
with remaining passes.
Changes:
- src/uu/shred/src/shred.rs: Use ? operator for error propagation
- tests/by-util/test_shred.rs: Enable previously ignored test1 parent 18a50ff commit 31b5cc1
2 files changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
722 | 719 | | |
723 | 720 | | |
724 | 721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
290 | | - | |
291 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | | - | |
| 298 | + | |
| 299 | + | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| |||
0 commit comments