Skip to content

Commit 70fead2

Browse files
authored
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.
1 parent b2457ef commit 70fead2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/coreconfig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ _PyCoreConfig_Read(_PyCoreConfig *config)
13441344
config->argc = 0;
13451345
}
13461346

1347-
if (config->filesystem_encoding == NULL && config->filesystem_errors == NULL) {
1347+
if (config->filesystem_encoding == NULL || config->filesystem_errors == NULL) {
13481348
err = config_init_fs_encoding(config);
13491349
if (_Py_INIT_FAILED(err)) {
13501350
return err;

0 commit comments

Comments
 (0)