bpo-38234: Add tests for Python init path config (GH-16358)

This commit is contained in:
Victor Stinner 2019-09-24 18:21:02 +02:00 committed by GitHub
parent 1ce152a42e
commit bb6bf7d342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 176 additions and 24 deletions

View file

@ -1012,12 +1012,12 @@ calculate_zip_path(PyCalculatePath *calculate, const wchar_t *prefix,
wchar_t *zip_path, size_t zip_path_len)
{
PyStatus status;
if (safe_wcscpy(zip_path, prefix, zip_path_len) < 0) {
return PATHLEN_ERR();
}
if (calculate->prefix_found > 0) {
/* Use the reduced prefix returned by Py_GetPrefix() */
if (safe_wcscpy(zip_path, prefix, zip_path_len) < 0) {
return PATHLEN_ERR();
}
reduce(zip_path);
reduce(zip_path);
}