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

With just PATHCCH_ALLOW_LONG_PATHS, PathCchCombineEx() returns a long path as a 
normal path (i.e. not a \\?\ extended path) if long-path support is enabled for 
the current process. Otherwise, if long-path support isn't enabled or 
available, as is always the case in Windows 8.1, then PATHCCH_ALLOW_LONG_PATHS 
makes PathCchCombineEx() return a long path as an extended path. In most cases, 
extended paths work fine. A common exception is that extended paths aren't 
supported for the working directory.

In Windows 10+, PATHCCH_FORCE_ENABLE_LONG_NAME_PROCESS forces 
PathCchCombineEx() to always return a long path as a normal path, even if 
long-path support is disabled for the current process. For most cases, this 
option pretty much guarantees that long paths will cause immediate failures if 
long-path support is disabled for the current process. In some cases one might 
want an immediate failure, instead of messing around with extended paths that 
might fail in some obscure, buggy way. Also, for pure path manipulation one may 
not care whether the current process can access the path without the \\?\ 
prefix.

----------
nosy: +eryksun

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

Reply via email to