Doxygen: "Failed to create output directory" on second run if "CREATE_SUBDIRS = YES"

Created on 18 Jun 2020  路  6Comments  路  Source: doxygen/doxygen

After upgrading to the latest master version today (d0f24b762e23b1b0c069209978aa403acc027cdf), Doxygen fails to create the output directories with the option CREATE_SUBDIRS = YES when the directory already exists.
This wasn't an issue a couple of months ago (I don't have the exact commit, but it was a master version after the 1.8.18 release).
If the default option CREATE_SUBDIRS = NO is used, it works fine as well.

Error message

[...]
Counting members...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Correcting members for VHDL...
error: Failed to create output directory 'd0'
Exiting...
exit status 1

Reproduction

Simply enable CREATE_SUBDIRS = YES and run Doxygen twice. The first time, it works fine, because the output directories don't exist yet. The second time, it fails with the error message above.

A workaround is removing the html folder every time before running Doxygen.

Full Doxyfile, code and output: Doxygen-7860.zip

Version

1.8.19 (d0f24b762e23b1b0c069209978aa403acc027cdf), Ubuntu 20.04 LTS, compiled from source (master) earlier today.

bug

All 6 comments

I have an idea what the cause of this problem might be. Recently some changes were made in checking the creation of directories and probably this is a side effect.

It seems like this issue was introduced in e6a6e65d46196125a5baad4aeb1942aa043236fa. The commit before it (fa4e3f5f955e602f02545e049361510f3334cfff) works fine.

I opened a pull request (#7861) that checks if the directory exists before trying to create it.
I tried QDir::mkpath first (it returns true if the folder already exists), but it doesn't seem to be included with the version of Qt that Doxygen ships with.

It is strange that the test was forgotten here (it looks like that the test is present at all other places).
Doxygen uses for its kernel indeed a quite old Qt version with some corrections.

I'm glad it works now :)
Thanks a lot for the quick response and the work you're doing!

Code has been integrated in master on github (closing issue as it only occurred in the master version)

Was this page helpful?
0 / 5 - 0 ratings