Skip to content

Commit 16d784e

Browse files
committed
pathconfig: normpath sys.path[0]
this gets added as first element in sys.path. use normpath to make sure it uses the right path separator
1 parent c7900e4 commit 16d784e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/pathconfig.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ _PyPathConfig_ComputeSysPath0(const PyWideStringList *argv, PyObject **path0_p)
662662
}
663663
#endif /* All others */
664664

665-
PyObject *path0_obj = PyUnicode_FromWideChar(path0, n);
665+
PyObject *path0_obj = PyUnicode_FromWideChar(_Py_normpath(path0, -1), n);
666666
if (path0_obj == NULL) {
667667
return -1;
668668
}

0 commit comments

Comments
 (0)