Fix imp_cache_from_source(): Decode make_compiled_pathname() result from the

filesystem encoding instead of utf-8.

imp_cache_from_source() encodes the input path to filesystem encoding and this
path is passed to make_compiled_pathname().
This commit is contained in:
Victor Stinner 2010-10-15 22:46:07 +00:00
parent 1a5630326f
commit 88bd891e6c
1 changed files with 1 additions and 1 deletions

View File

@ -3483,7 +3483,7 @@ imp_cache_from_source(PyObject *self, PyObject *args, PyObject *kws)
PyErr_Format(PyExc_SystemError, "path buffer too short");
return NULL;
}
return PyUnicode_FromString(buf);
return PyUnicode_DecodeFSDefault(buf);
}
PyDoc_STRVAR(doc_cache_from_source,