]> granicus.if.org Git - python/commitdiff
On startup, attempt to set the working directory to $HOME.
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 3 Jun 2004 14:15:50 +0000 (14:15 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 3 Jun 2004 14:15:50 +0000 (14:15 +0000)
Fixes #913581.

Mac/OSX/PythonLauncher/main.m

index 70323f2d02de5deeed387d4f5c9366c6588be78e..6841433f429f3fa21d7f126ccb64567cb63f5079 100755 (executable)
@@ -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);
 }