Commit e9ca618
committed
refactor(uu/rm): extract device skip logic into reusable function
Extract the logic for checking and skipping directories on different devices into a new `should_skip_different_device_with_dev` function. This refactoring improves code organization by consolidating the device check, error handling, and preserve-root logic into a single, reusable Unix-specific function, while providing a no-op for non-Unix platforms. The change maintains existing behavior but enhances maintainability.1 parent a10928d commit e9ca618
2 files changed
+36
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
333 | 327 | | |
334 | 328 | | |
335 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
618 | 638 | | |
619 | 639 | | |
620 | | - | |
| 640 | + | |
621 | 641 | | |
622 | 642 | | |
623 | 643 | | |
| |||
632 | 652 | | |
633 | 653 | | |
634 | 654 | | |
635 | | - | |
| 655 | + | |
636 | 656 | | |
637 | | - | |
| 657 | + | |
638 | 658 | | |
639 | 659 | | |
640 | 660 | | |
| |||
0 commit comments