Skip to content

Commit

Permalink
Fixed problem with -w command when no Doxyfile was present and specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Jun 2, 2016
1 parent e629fc6 commit 7c31264
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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");
Expand All @@ -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))
Expand Down

0 comments on commit 7c31264

Please sign in to comment.