Permalink
Browse files

Fixed problem with -w command when no Doxyfile was present and specified

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Jun 2, 2016
1 parent e629fc6 commit 7c3126407bbb46717a4e0a09b61ee001702af7bf
Showing with 8 additions and 13 deletions.
  1. +8 −13 src/doxygen.cpp
View
@@ -10258,28 +10258,26 @@ void readConfiguration(int argc, char **argv)
}
else if (qstricmp(formatName,"html")==0)
{
Config::init();
if (optind+4<argc || QFileInfo("Doxyfile").exists())
// explicit config file mentioned or default found on disk
{
QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
if (!Config::parse(df))
if (!Config::parse(df)) // parse the config file
{
err("error opening or reading configuration file %s!\n",argv[optind+4]);
cleanUpDoxygen();
exit(1);
}
Config::postProcess(TRUE);
Config::checkAndCorrect();
}
else
{
Config::init();
}
if (optind+3>=argc)
{
err("option \"-w html\" does not have enough arguments\n");
cleanUpDoxygen();
exit(1);
}
Config::postProcess(TRUE);
Config::checkAndCorrect();
QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
@@ -10307,6 +10305,7 @@ void readConfiguration(int argc, char **argv)
}
else if (qstricmp(formatName,"latex")==0)
{
Config::init();
if (optind+4<argc || QFileInfo("Doxyfile").exists())
{
QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
@@ -10316,19 +10315,15 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(1);
}
Config::postProcess(TRUE);
Config::checkAndCorrect();
}
else // use default config
{
Config::init();
}
if (optind+3>=argc)
{
err("option \"-w latex\" does not have enough arguments\n");
cleanUpDoxygen();
exit(1);
}
Config::postProcess(TRUE);
Config::checkAndCorrect();
QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))

0 comments on commit 7c31264

Please sign in to comment.