summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2004-06-03 14:15:50 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2004-06-03 14:15:50 (GMT)
commit76375745d552e9c0e70f541e8205a0677acbba26 (patch)
treec1835a033a84e5139e5cb98a50462e5f6e86518c /Mac
parent2d1a2aa117f1cce9b4206032fcdac3632fa6a819 (diff)
downloadcpython-76375745d552e9c0e70f541e8205a0677acbba26.zip
cpython-76375745d552e9c0e70f541e8205a0677acbba26.tar.gz
cpython-76375745d552e9c0e70f541e8205a0677acbba26.tar.bz2
On startup, attempt to set the working directory to $HOME.
Fixes #913581.
Diffstat (limited to 'Mac')
-rwxr-xr-xMac/OSX/PythonLauncher/main.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mac/OSX/PythonLauncher/main.m b/Mac/OSX/PythonLauncher/main.m
index 70323f2..6841433 100755
--- a/Mac/OSX/PythonLauncher/main.m
+++ b/Mac/OSX/PythonLauncher/main.m
@@ -7,8 +7,11 @@
//
#import <Cocoa/Cocoa.h>
+#include <unistd.h>
int main(int argc, const char *argv[])
{
+ char *home = getenv("HOME");
+ if (home) chdir(home);
return NSApplicationMain(argc, argv);
}