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

As discussed in msg337357, the Windows API does not support setting the current 
working directory to a path that starts with \\?\ or \\.\. It's dysfunctional 
in many cases. Anyway, using a \\?\ path does not remove the length limit on 
the working directory, which is a hard limit in a process that does not support 
long DOS paths. I assume this is why CreateProcessW() hasn't been extended to 
support long paths in lpCurrentDirectory. 

The only behavior that can be addressed here is what to do when 
CreateProcessW() fails with ERROR_INVALID_PARAMETER (87) if the working 
directory of the current process is a long path. Maybe subprocess should emit a 
warning for this error if the working directory is a long path, at least to 
hint to a developer that this could be the reason for the error. Otherwise the 
error is difficult to understand if you don't already know what to look for.

----------
components: +Library (Lib)
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6, Python 3.7

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

Reply via email to