Re: bafna_p - r31400 - abiword/branches/gsoc2012math/plugins/latex/xp

From: Hubert Figuière <hfiguiere_at_teaser.fr>
Date: Tue Jun 19 2012 - 07:59:33 CEST

On 18/06/12 10:42 PM, cvs@abisource.com wrote:
>
> Author: bafna_p
> Date: 2012-06-19 07:42:38 +0200 (Tue, 19 Jun 2012)
> New Revision: 31400
>
> Modified:
> abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp
> Log:
> adding the path of xsltml for windows as well
>
> Modified: abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp
> ===================================================================
> --- abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp 2012-06-18 19:25:13 UTC (rev 31399)
> +++ abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp 2012-06-19 05:42:38 UTC (rev 31400)
> @@ -1599,9 +1599,14 @@
> return false;
> if (!cur)
> {
> - UT_UTF8String path(XAP_App::getApp()->getAbiSuiteLibDir());
> - path += "/xsltml/mmltex.xsl";
> -
> + #ifdef WIN32
> + UT_UTF8String path("../../plugins/latex/xsltml/mmltex.xsl");
> + // changed the path string as the below works for linux, however in windows it goes to msvc2008/Debug/xsltml which is wrong
> + #else
> + UT_UTF8String path(XAP_App::getApp()->getAbiSuiteLibDir());
> + path += "/xsltml/mmltex.xsl";
> + #endif
> +

This is wrong too.

Because you have absolutely no guarantee that the current directory will
be what it is.

If XAP_App::getApp()->getAbiSuiteLibDir() does not return the correct
value then it is a bug.
Note that I don't know the implementation on Windows.

Hub
Received on Tue Jun 19 07:59:40 2012

This archive was generated by hypermail 2.1.8 : Tue Jun 19 2012 - 07:59:41 CEST