[issue22299] resolve() on Windows makes some pathological paths unusable

Steve Dower report at bugs.python.org
Thu Sep 11 21:50:24 CEST 2014


Steve Dower added the comment:

Another alternative is to always leave the prefix there after calling resolve() (as opposed to the current behaviour which is to always remove it). If the Win32 API says that the path should include the prefix, then it should. There's no reliable way for a developer to decide that an arbitrary path should include the prefix other than by resolving it.

I still like the idea of a format character to omit the prefix, as that correctly implies that the only reason you should remove it is for displaying to the user. Alternatively, a ".without_prefix" property seems like a safer route than requiring the user to add it. Long paths are the only time you may want to add it, but even that doesn't guarantee that the path will work.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22299>
_______________________________________


More information about the Python-bugs-list mailing list