Message260068
> 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 |
|
Date |
User |
Action |
Args |
2016-02-11 03:02:37 | eryksun | set | recipients:
+ eryksun, loewis, pitrou, vstinner, ezio.melotti, Aaron.Meurer, santoso.wijaya, Voo, jens, zach.ware, serhiy.storchaka, steve.dower |
2016-02-11 03:02:37 | eryksun | set | messageid: <1455159757.02.0.743086101475.issue18199@psf.upfronthosting.co.za> |
2016-02-11 03:02:36 | eryksun | link | issue18199 messages |
2016-02-11 03:02:36 | eryksun | create | |
|