Files
MINGW-packages/mingw-w64-python3.12/0097-pathconfig-normpath-sys.path-0.patch
2024-09-10 08:53:36 +02:00

25 lines
871 B
Diff

From 189df6a793e125427a10ab7a7051a60d19ef1a84 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;
}