From cd16354fd00cf6c3d8de5a5868f00b143e2182ff Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Wed, 8 Jul 2009 02:54:39 +0000 Subject: [PATCH] Fixed a glaring error concerning the situation where the cti file is not in the current directory. THe xml file is always written to the current directory. And the subsequent reading of the xml file must reflect that. The xml file was trying to be read from the directory where the cti file was located. Now, the xml file will be read from the current directory. --- Cantera/src/base/ct2ctml.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Cantera/src/base/ct2ctml.cpp b/Cantera/src/base/ct2ctml.cpp index f1f88a341..5a2be3026 100644 --- a/Cantera/src/base/ct2ctml.cpp +++ b/Cantera/src/base/ct2ctml.cpp @@ -266,16 +266,22 @@ namespace ctml { } if (ext != ".xml" && ext != ".ctml") { ct2ctml(inname.c_str(), debug); - ff = inname.substr(0,idot) + ".xml"; + string ffull = inname.substr(0,idot) + ".xml"; + ff = "./" + getBaseName(ffull) + ".xml"; +#ifdef DEBUG_PATHS + writelogf("ffull name = %s\n", ffull.c_str()); + writelogf("ff name = %s\n", ff.c_str()); +#endif } else { ff = inname; } #ifdef DEBUG_PATHS writelog("Attempting to parse xml file " + ff + "\n"); -#endif +#else if (debug > 0) writelog("Attempting to parse xml file " + ff + "\n"); +#endif ifstream fin(ff.c_str()); if (!fin) { throw