home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!cass.ma02.bull.com!think.com!ames!kronos.arc.nasa.gov!iscnvx!netcomsv!terapin!paulk
- From: paulk@terapin.com (Paul Kienitz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Help with my C program anyone?
- Message-ID: <paulk.27os@terapin.com>
- Date: 15 Nov 92 19:51:30 GMT
- References: <1992Nov13.065904.1066@cs.uow.edu.au>
- Organization: BBS
- Lines: 28
-
- > My problem is this: I get no error messages from any of the OS
- > functions, they all seem to work fine, except that the current
- > directory has NOT been changed. (I have verified this because the
- > program is run from the CLI and I just printf the GetCurrentDirName
- > string).
- >
- > The main problem is however, that a) the directory name on the
- > shell prompt is not the new directory ( I was thinking that perhaps
- > this has to be set manually)
-
- CurrentDir() does NOT change the directory name string. That's what
- SetCurrentDirName() is for. If you want the two to match you have to
- use both.
-
- > b) when I do another disk command such as 'dir' after running my
- > program the machine crashes!
-
- Well, let's see. Your procedure was to do this:
-
- > By now, I assume that the UnLock function has unlocked the preous
- > directory, and there is now a valid lock on the new directory, and
- > it has become the current directory. Before my program finishes I
- > make sure that it unlocks the new current directory.
-
- So once the lock that you used for the new CD has been unlocked and
- is no longer usable, what did you put in its place? What is
- CurrentDir set to when your program exits? The one you just
- unlocked? You discarded the original value you found there...
-