Commit 7b22c4c
committed
gh-102475: Fix os.path.realpath() for names which look like a drive
The unresolved part of the path was joined with the resolved part using
join(), so a component containing a colon (e.g. "spam:eggs") reset the path.
It is now simply appended.
A path relative to a drive which does not exist (e.g. "Z:spam") is now
resolved against the root directory of that drive, as the Windows path
normalization does.1 parent 998b890 commit 7b22c4c
3 files changed
Lines changed: 51 additions & 7 deletions
File tree
- Lib
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
630 | 641 | | |
631 | 642 | | |
632 | 643 | | |
633 | 644 | | |
634 | | - | |
| 645 | + | |
635 | 646 | | |
636 | 647 | | |
637 | 648 | | |
| |||
642 | 653 | | |
643 | 654 | | |
644 | 655 | | |
645 | | - | |
| 656 | + | |
646 | 657 | | |
647 | 658 | | |
648 | 659 | | |
| |||
657 | 668 | | |
658 | 669 | | |
659 | 670 | | |
660 | | - | |
| 671 | + | |
661 | 672 | | |
662 | 673 | | |
663 | 674 | | |
| |||
666 | 677 | | |
667 | 678 | | |
668 | 679 | | |
669 | | - | |
670 | 680 | | |
671 | 681 | | |
672 | 682 | | |
| |||
675 | 685 | | |
676 | 686 | | |
677 | 687 | | |
678 | | - | |
679 | 688 | | |
680 | 689 | | |
681 | 690 | | |
| |||
692 | 701 | | |
693 | 702 | | |
694 | 703 | | |
695 | | - | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
696 | 707 | | |
697 | 708 | | |
698 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
1538 | 1567 | | |
1539 | 1568 | | |
1540 | 1569 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments