bpo-34523: Fix config_init_fs_encoding() (GH-8991)

Call config_init_fs_encoding() if filesystem_errors is not NULL but
filesystem_encoding is NULL.
This commit is contained in:
Victor Stinner 2018-08-29 13:45:34 +02:00 committed by GitHub
parent b2457efc78
commit 70fead25e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1344,7 +1344,7 @@ _PyCoreConfig_Read(_PyCoreConfig *config)
config->argc = 0;
}
if (config->filesystem_encoding == NULL && config->filesystem_errors == NULL) {
if (config->filesystem_encoding == NULL || config->filesystem_errors == NULL) {
err = config_init_fs_encoding(config);
if (_Py_INIT_FAILED(err)) {
return err;