Commit 28e7831
committed
gh-100809: Fix handling of drive-relative paths in pathlib.Path.absolute()
If it's available, use `nt._getfullpathname()` to retrieve an absolute
path. This allows paths such as 'X:' to be made absolute even when
`os.getcwd()` returns a path on another drive. It follows the behaviour of
`os.path.abspath()`, except that no path normalisation is performed.1 parent 7fba99e commit 28e7831
3 files changed
Lines changed: 29 additions & 5 deletions
File tree
- Lib
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
| |||
827 | 838 | | |
828 | 839 | | |
829 | 840 | | |
830 | | - | |
| 841 | + | |
831 | 842 | | |
832 | 843 | | |
833 | 844 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1554 | 1554 | | |
1555 | 1555 | | |
1556 | 1556 | | |
1557 | | - | |
1558 | | - | |
| 1557 | + | |
1559 | 1558 | | |
1560 | 1559 | | |
1561 | 1560 | | |
| |||
2993 | 2992 | | |
2994 | 2993 | | |
2995 | 2994 | | |
2996 | | - | |
2997 | | - | |
| 2995 | + | |
| 2996 | + | |
2998 | 2997 | | |
| 2998 | + | |
2999 | 2999 | | |
3000 | 3000 | | |
3001 | 3001 | | |
3002 | 3002 | | |
3003 | 3003 | | |
3004 | 3004 | | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
3005 | 3015 | | |
3006 | 3016 | | |
3007 | 3017 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments