]> granicus.if.org Git - python/commitdiff
Paths and file names from the fs should always be decoded with PyUnicode_DecodeFSDefa...
authorChristian Heimes <christian@cheimes.de>
Wed, 14 Nov 2007 00:15:01 +0000 (00:15 +0000)
committerChristian Heimes <christian@cheimes.de>
Wed, 14 Nov 2007 00:15:01 +0000 (00:15 +0000)
Python/sysmodule.c

index 6fcbe75eef53c505d0ff3c74996a1f05e2cf83a0..b77d18417acd2dc2388c89ca1c794c408b075fb9 100644 (file)
@@ -1072,11 +1072,12 @@ _PySys_Init(void)
        SET_SYS_FROM_STRING("platform",
                            PyUnicode_FromString(Py_GetPlatform()));
        SET_SYS_FROM_STRING("executable",
-                           PyUnicode_FromString(Py_GetProgramFullPath()));
+                           PyUnicode_DecodeFSDefault(
+                               Py_GetProgramFullPath()));
        SET_SYS_FROM_STRING("prefix",
-                           PyUnicode_FromString(Py_GetPrefix()));
+                           PyUnicode_DecodeFSDefault(Py_GetPrefix()));
        SET_SYS_FROM_STRING("exec_prefix",
-                           PyUnicode_FromString(Py_GetExecPrefix()));
+                           PyUnicode_DecodeFSDefault(Py_GetExecPrefix()));
        SET_SYS_FROM_STRING("maxint",
                            PyInt_FromLong(PyInt_GetMax()));
        SET_SYS_FROM_STRING("maxsize",