New GitHub issue #100809 from barneygale:<br>

<hr>

<pre>
Windows has one current directory *per drive*, and supports drive-relative paths like 'X:' and 'X:foo.txt'. This makes a conversion from relative to absolute paths more complicated than simply prepending a (single) current directory. 

It's correctly handled in `ntpath.abspath()` by calling NT's [`GetFullPathNameW()`](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew) function. But in pathlib we simply prepend `os.getcwd()`, leading to incorrect results:

```python
>>> import os, nt, pathlib
>>> os.chdir('Z:/build')
>>> os.chdir('C:/')
>>> os.path.abspath('Z:')
'Z:\\build'
>>> nt._getfullpathname('Z:')
'Z:\\build'
>>> pathlib.Path('Z:').absolute()
WindowsPath('Z:')
```

This bug is present in all versions of CPython pathlib. We can't fix it by calling `abspath()` because it will also normalize the path, eliding '..' parts.
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/100809">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>