diff options
author | Guido van Rossum <guido@python.org> | 1995-02-20 23:41:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-20 23:41:35 (GMT) |
commit | bcf3b56ea7c1c3ec3577d9f473d2a94a1e8db91b (patch) | |
tree | bf15509216dc9c3a197d8fbebd261ee421313014 /Mac/Compat | |
parent | 86b4049b87edc7323252a0b8f18e212fe0e1d93c (diff) | |
download | cpython-bcf3b56ea7c1c3ec3577d9f473d2a94a1e8db91b.zip cpython-bcf3b56ea7c1c3ec3577d9f473d2a94a1e8db91b.tar.gz cpython-bcf3b56ea7c1c3ec3577d9f473d2a94a1e8db91b.tar.bz2 |
also set cur dir for standard get/put file
Diffstat (limited to 'Mac/Compat')
-rw-r--r-- | Mac/Compat/chdir.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Mac/Compat/chdir.c b/Mac/Compat/chdir.c index 3f89b52..bc9a303 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; } |