On 17 Oct 2000, Jean-Marc Lasgouttes wrote:
> >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
>
> Angus> I recently changed InsetBibtex::getKeys() so that it was passed
> Angus> a Buffer *. It needed this so that it could set Path
> Angus> p(buffer->filepath); without having to use
> Angus> current_view->buffer.
>
> Angus> Looking at the code again, I see that "p" is not used to find
> Angus> the file path anymore. I'm sure that this is a recent change
> Angus> and I seem to remember reading some comments by Jean-Marc in
> Angus> the original code about why it was needed.
>
> The effect of the Path p thing is a local chdir. It changes the
> current directory, and then restores it when p is deleted. Does this
> answer to your question?
It is a good idea then to document this unnoticeable side effect.
Adding the following line will do wonders to the understanding of this
code for later maintenance.
// This will change the current directory for the duration of the method.
--
Baruch Even
http://techst02.technion.ac.il/~sbaruch/ (My Site)
http://www.redrival.com/jindor/ (My brothers AD&D site)
" Learn to laugh ... it's the path to true love! "
- The Angel in the movie Michael