[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: side note to ppfChdir

Pierre Phaneuf wrote:
>Having to do a real chdir() is a bad idea IMHO. The problem is that it
>changes the general behavior of the program, for example, if it core
>dumps, the dump will not be in the expected place. Example:

The problem is that PFile can be used to read perfectly normal files (just
like stdio). Furthermore the user doesn't have to specify whether the file
he wants to open is a perfectly normal file or some file in a PakFile or
something else. That means ppfChdir () has to ensure that both the
"normal" current working dir (as set by chdir ()) and the PFile VFS current
working dir point to the same logical directory. If you don't understand
that, don't worry. It *is* difficult. I'm writing a doc section explaining

Until that is ready, please trust me that chdir () *should* be called ;)


Drive A: not responding...Formatting C: instead