Kaydet (Commit) bcf3b56e authored tarafından Guido van Rossum's avatar Guido van Rossum

also set cur dir for standard get/put file

üst 86b4049b
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#include "macdefs.h" #include "macdefs.h"
/* Last directory used by Standard File */
#define SFSaveDisk (*(short *)0x214)
#define CurDirStore (*(long *)0x398)
/* Change current directory. */ /* Change current directory. */
int int
...@@ -19,5 +23,10 @@ chdir(path) ...@@ -19,5 +23,10 @@ chdir(path)
errno= ENOENT; errno= ENOENT;
return -1; return -1;
} }
if (PBHGetVol(&pb, FALSE) == noErr) {
/* Set the Standard File directory */
SFSaveDisk= -pb.ioWDVRefNum;
CurDirStore= pb.ioWDDirID;
}
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment