Eryk Sun added the comment:
> There is a problem with os.chdir(): It doesn't work with
> \\?\ notation.
The process current directory is part of the Windows API, so it's subject to
the MAX_PATH limit [1]. See SetCurrentDirectory [2]. Python can't do anything
about this.
As to shutil.rmtree, I agree it's an example of why the Windows path-length
problem needs to be addressed more generally. Maybe there could be a __path__
special method supported by pathlib paths. On Windows this could resolve to an
absolute path prefixed with "\\?\".
[1]: Native NT relative paths are relative to a handle in the
OBJECT_ATTRIBUTES record that's used to create or open an
object. This isn't generally exposed in the Windows API,
except in the registry API.
[2]: https://msdn.microsoft.com/en-us/library/aa365530
----------
nosy: +eryksun
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18199>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com