25 lines
871 B
Diff
25 lines
871 B
Diff
From b0908f8b64b4527994119d65f949ae1305a25d8e Mon Sep 17 00:00:00 2001
|
|
From: Christoph Reiter <reiter.christoph@gmail.com>
|
|
Date: Fri, 28 Jul 2023 20:14:38 +0200
|
|
Subject: [PATCH 097/N] 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
|
|
---
|
|
Python/pathconfig.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
|
|
index 8053b91..7eb9006 100644
|
|
--- a/Python/pathconfig.c
|
|
+++ b/Python/pathconfig.c
|
|
@@ -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;
|
|
}
|