Repository navigation
Commit a8d4f06
committed
gh-135122: Raise NotADirectoryError in ntpath.realpath(strict=ALLOW_MISSING)
On Windows, a path whose non-final component is an existing file fails
with ERROR_PATH_NOT_FOUND, which is a FileNotFoundError and was ignored
in ALLOW_MISSING mode, so realpath() returned a path that can never be
created. Check that the deepest existing prefix is a directory and raise
NotADirectoryError otherwise, as posixpath.realpath() does.1 parent 369d8bc commit a8d4f06
3 files changed
Lines changed: 51 additions & 6 deletions
File tree
- Lib
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
613 | 614 | | |
614 | 615 | | |
615 | 616 | | |
616 | | - | |
| 617 | + | |
617 | 618 | | |
618 | 619 | | |
619 | 620 | | |
| |||
650 | 651 | | |
651 | 652 | | |
652 | 653 | | |
653 | | - | |
654 | | - | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
655 | 661 | | |
656 | 662 | | |
657 | 663 | | |
| |||
735 | 741 | | |
736 | 742 | | |
737 | 743 | | |
738 | | - | |
| 744 | + | |
| 745 | + | |
739 | 746 | | |
740 | 747 | | |
741 | 748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
597 | 629 | | |
598 | 630 | | |
599 | 631 | | |
| |||
1083 | 1115 | | |
1084 | 1116 | | |
1085 | 1117 | | |
1086 | | - | |
| 1118 | + | |
| 1119 | + | |
1087 | 1120 | | |
1088 | 1121 | | |
1089 | 1122 | | |
| |||
1094 | 1127 | | |
1095 | 1128 | | |
1096 | 1129 | | |
1097 | | - | |
| 1130 | + | |
| 1131 | + | |
1098 | 1132 | | |
1099 | 1133 | | |
1100 | 1134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments