From: Vladimír Vondruš Date: Sat, 7 Nov 2020 15:29:02 +0000 (+0100) Subject: documentation/doxygen: don't create output dir if it's empty. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=daef291c943073b8cb7391c154ad48c948da1574;p=blog.git 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. --- 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))