]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
also set cur dir for standard get/put file
authorGuido van Rossum <guido@python.org>
Mon, 20 Feb 1995 23:41:35 +0000 (23:41 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 20 Feb 1995 23:41:35 +0000 (23:41 +0000)
Mac/Compat/chdir.c

index 3f89b5255d95ddc809a460047b3525b805d35698..bc9a30354f187f71c253c818539ab162fb5cf0cb 100644 (file)
@@ -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;
 }