diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-09-24 16:21:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 16:21:02 (GMT) |
commit | bb6bf7d342b4503a6227fd209fac934905b6a1aa (patch) | |
tree | 6d89abb9ab9aa33664f4716c51537dcce6545496 /Modules | |
parent | 1ce152a42eaa917d7763bce93f1e1ca72530d7ca (diff) | |
download | cpython-bb6bf7d342b4503a6227fd209fac934905b6a1aa.zip cpython-bb6bf7d342b4503a6227fd209fac934905b6a1aa.tar.gz cpython-bb6bf7d342b4503a6227fd209fac934905b6a1aa.tar.bz2 |
bpo-38234: Add tests for Python init path config (GH-16358)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/getpath.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index 24e16b4..a4607ef 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -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); } |