Lars Gullik Bjønnes wrote:

> Asger Ottar Alstrup <[EMAIL PROTECTED]>
> writes:
> 
>>> | Index: src/support/path.C
>>> | ===================================================================
>>> | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/path.C,v
>>> | retrieving revision 1.12
>>> | diff -u -p -r1.12 path.C
>>> | --- src/support/path.C    7 Nov 2004 13:22:51 -0000       1.12
>>> | +++ src/support/path.C    20 Jan 2005 17:30:20 -0000
>>> | @@ -28,8 +28,10 @@ Path::Path(string const & path)
>>> |  {
>>> |  if (!path.empty()) {
>>> |  pushedDir_ = getcwd();
>>> | +#if 0
>>> |  if (pushedDir_.empty() || chdir(path))
>>> |  /* FIXME: throw */;
>>> | +#endif
>>
> | It's seems that chdir would have a side-effect, which you are removing
> | now. Are you sure the patch is good?
> 
> And that is true as well. No the patch is not good.
> 
> But I think there are other problems with this code as well.
> 
> chdir returns 0 on success.
> 
> if (pushedDir_.emtpy() || chdir(path) == -1)
>    /* bad stuff happended */ ;
> 
> seems more correct. Unnoticed since we have not been using exceptions.
> Would just give files or run files in the wrong dir instead.

Ok, I'll add this to my list and also revisit the string literal array 
stuff in math_spaceinset.C and in lyxfont.C, changing the arrays to hold 
strings.

-- 
Angus

Reply via email to