Commit 818bf02
committed
rm: Check filesystem checks in
- Rename `validate_single_filesystem` to `check_one_fs` for improved clarity and alignment with its functionality.
- Refactore `check_one_fs` to directly handle options such as `--one-file-system` and `--preserve-root=all` and return detailed error messages when the conditions are not met.
- Integrate `check_one_fs` into `remove_dir_recursive` and `handle_dir` for consistent handling of files and directories on different file systems.rm command1 parent 196ac9f commit 818bf02
File tree
3 files changed
+36
-42
lines changed- src/uu/rm/src
- tests/by-util
- util
3 files changed
+36
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
459 | 470 | | |
460 | 471 | | |
461 | 472 | | |
| |||
550 | 561 | | |
551 | 562 | | |
552 | 563 | | |
553 | | - | |
| 564 | + | |
554 | 565 | | |
555 | 566 | | |
556 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
557 | 574 | | |
558 | 575 | | |
559 | 576 | | |
| |||
578 | 595 | | |
579 | 596 | | |
580 | 597 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
| 598 | + | |
| 599 | + | |
594 | 600 | | |
595 | | - | |
| 601 | + | |
596 | 602 | | |
597 | 603 | | |
598 | 604 | | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
617 | 612 | | |
618 | 613 | | |
619 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
1030 | | - | |
| 1029 | + | |
| 1030 | + | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
| |||
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | | - | |
1050 | 1049 | | |
| 1050 | + | |
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
| 1070 | + | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
| |||
1095 | 1095 | | |
1096 | 1096 | | |
1097 | 1097 | | |
1098 | | - | |
1099 | | - | |
| 1098 | + | |
1100 | 1099 | | |
1101 | 1100 | | |
1102 | 1101 | | |
| |||
1115 | 1114 | | |
1116 | 1115 | | |
1117 | 1116 | | |
1118 | | - | |
1119 | 1117 | | |
| 1118 | + | |
1120 | 1119 | | |
1121 | 1120 | | |
1122 | 1121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
0 commit comments