Eryk Sun <eryk...@gmail.com> added the comment:

If none of the components of a relative path exist, then splitting off the head 
returns an empty string in the second-to-last pass through the while loop. In 
the last pass, _getfinalpathname("") raises FileNotFoundError, and ultimately 
resolve() ends up returning `path`. To avoid this, the empty string needs to be 
replaced with a ".". Then the last pass can resolve the working directory.

----------
components: +Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware
stage:  -> needs patch
versions: +Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32434>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to