Skip to content

Commit 11f8b59

Browse files
lazkanaveen521kk
authored andcommitted
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 19d313b commit 11f8b59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/pathconfig.c

Lines changed: 1 addition & 1 deletion
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)