Message337309
subprocess.Popen calls _winapi.CreateProcess. The current_directory is a wchar_t* string (Py_UNICODE*) passed to Windows CreateProcessW() (Unicode flavor of the API).
https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#maximum-path-length-limitation
"In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters."
I guess that the workaround is to use the "\\?\" prefix for "extended-length path". For example, "\\?\D:\very long path".
=> "The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters." |
|
Date |
User |
Action |
Args |
2019-03-06 14:49:45 | vstinner | set | recipients:
+ vstinner, paul.moore, tim.golden, zach.ware, steve.dower, Geoff.Alexander |
2019-03-06 14:49:45 | vstinner | set | messageid: <1551883785.54.0.540596528419.issue36213@roundup.psfhosted.org> |
2019-03-06 14:49:45 | vstinner | link | issue36213 messages |
2019-03-06 14:49:45 | vstinner | create | |
|