Commit 70fead25 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

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.
parent b2457efc
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment