From: Guido van Rossum Date: Mon, 20 Feb 1995 23:41:35 +0000 (+0000) Subject: also set cur dir for standard get/put file X-Git-Tag: v1.2b4~190 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bcf3b56ea7c1c3ec3577d9f473d2a94a1e8db91b;p=thirdparty%2FPython%2Fcpython.git also set cur dir for standard get/put file --- diff --git a/Mac/Compat/chdir.c b/Mac/Compat/chdir.c index 3f89b5255d95..bc9a30354f18 100644 --- a/Mac/Compat/chdir.c +++ b/Mac/Compat/chdir.c @@ -4,6 +4,10 @@ #include "macdefs.h" +/* Last directory used by Standard File */ +#define SFSaveDisk (*(short *)0x214) +#define CurDirStore (*(long *)0x398) + /* Change current directory. */ int @@ -19,5 +23,10 @@ chdir(path) errno= ENOENT; return -1; } + if (PBHGetVol(&pb, FALSE) == noErr) { + /* Set the Standard File directory */ + SFSaveDisk= -pb.ioWDVRefNum; + CurDirStore= pb.ioWDDirID; + } return 0; }