From daef291c943073b8cb7391c154ad48c948da1574 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 7 Nov 2020 16:29:02 +0100 Subject: [PATCH] documentation/doxygen: don't create output dir if it's empty. It doesn't make sense to me why makedirs() wouldn't just gracefully no-op that. --- documentation/doxygen.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/doxygen.py b/documentation/doxygen.py index fb0ce03e..4ca2e45b 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -3843,8 +3843,10 @@ if __name__ == '__main__': # pragma: no cover parse_doxyfile(state, doxyfile) # Doxygen is stupid and can't create nested directories, create the input - # directory for it - os.makedirs(state.doxyfile['OUTPUT_DIRECTORY'], exist_ok=True) + # directory for it. Don't do it when the argument is empty, because + # apparently makedirs() is also stupid. + if state.doxyfile['OUTPUT_DIRECTORY']: + os.makedirs(state.doxyfile['OUTPUT_DIRECTORY'], exist_ok=True) if not args.no_doxygen: logging.debug("running Doxygen on {}".format(doxyfile)) -- 2.30.2