Skip to content

Commit

Permalink
pathconfig: normpath sys.path[0]
Browse files Browse the repository at this point in the history
this gets added as first element in sys.path.
use normpath to make sure it uses the right path separator
  • Loading branch information
lazka authored and naveen521kk committed Jul 29, 2023
1 parent 19d313b commit 11f8b59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/pathconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ _PyPathConfig_ComputeSysPath0(const PyWideStringList *argv, PyObject **path0_p)
}
#endif /* All others */

PyObject *path0_obj = PyUnicode_FromWideChar(path0, n);
PyObject *path0_obj = PyUnicode_FromWideChar(_Py_normpath(path0, -1), n);
if (path0_obj == NULL) {
return -1;
}
Expand Down

0 comments on commit 11f8b59

Please sign in to comment.