diff options
Diffstat (limited to 'src/config.l')
-rw-r--r-- | src/config.l | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/config.l b/src/config.l index 19f0267..cc0a2f8 100644 --- a/src/config.l +++ b/src/config.l @@ -1311,7 +1311,30 @@ void Config::check() mscgenPath=""; } - + // check dia path + QCString &diaPath = Config_getString("DIA_PATH"); + if (!diaPath.isEmpty()) + { + QFileInfo dp(diaPath+"/dia"+portable_commandExtension()); + if (!dp.exists() || !dp.isFile()) + { + config_err("Warning: dia could not be found at %s\n",diaPath.data()); + diaPath=""; + } + else + { + diaPath=dp.dirPath(TRUE).utf8()+"/"; +#if defined(_WIN32) // convert slashes + uint i=0,l=diaPath.length(); + for (i=0;i<l;i++) if (diaPath.at(i)=='/') diaPath.at(i)='\\'; +#endif + } + } + else // make sure the string is empty but not null! + { + diaPath=""; + } + // check input QStrList &inputSources=Config_getList("INPUT"); if (inputSources.count()==0) |