summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-07-23 16:05:35 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-07-23 16:05:35 (GMT)
commit97d1119ddeb60e70c6a4be2080f6b71ca2004f72 (patch)
tree49a493b50767533f68fe25f4f1a824dbe287ca2b /Modules
parent3f5f226ba0dab128f6a1b7ae534b1c29eb5db0e9 (diff)
downloadcpython-97d1119ddeb60e70c6a4be2080f6b71ca2004f72.zip
cpython-97d1119ddeb60e70c6a4be2080f6b71ca2004f72.tar.gz
cpython-97d1119ddeb60e70c6a4be2080f6b71ca2004f72.tar.bz2
Ensure that sys.prefix can reliably be found
on OSX. This fixes a small issue that was exposed by running test_subprocess through regrtest (and hence in a subdirectory). Without this patch running python.exe from the build tree will fail when these tree conditions are true: 1) the CWD is not the root of build tree 2) python.exe is found through $PATH 3) the framework is not yet installed
Diffstat (limited to 'Modules')
-rw-r--r--Modules/getpath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c
index a5b01ed..4164a12 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -552,7 +552,7 @@ calculate_path(void)
if (!ismodule(argv0_path)) {
/* We are in the build directory so use the name of the
executable - we know that the absolute path is passed */
- wcsncpy(argv0_path, prog, MAXPATHLEN);
+ wcsncpy(argv0_path, progpath, MAXPATHLEN);
}
else {
/* Use the location of the library as the progpath */