diff options
author | albert-github <albert.tests@gmail.com> | 2021-06-12 12:40:44 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2021-06-12 12:40:44 (GMT) |
commit | f366804a95c02d0883a3a1598a0f93b4ee0c982c (patch) | |
tree | 6367a57fc90302d6b3dcfd68ed7e4d1ac7d83d72 /src/util.cpp | |
parent | 8c8a0343662f69ce65ced20dc8c6025e7fc022cd (diff) | |
download | Doxygen-f366804a95c02d0883a3a1598a0f93b4ee0c982c.zip Doxygen-f366804a95c02d0883a3a1598a0f93b4ee0c982c.tar.gz Doxygen-f366804a95c02d0883a3a1598a0f93b4ee0c982c.tar.bz2 |
bug_674442 CREATE_FOLDERS should not create unused folders
Also known as issue #4672
The folders are still created but in case the folders are empty after the doxygen run the directories are removed.
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 37c5e62..7c469ab 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3702,6 +3702,32 @@ void createSubDirs(const Dir &d) } } +void clearSubDirs(const Dir &d) +{ + if (Config_getBool(CREATE_SUBDIRS)) + { + // remove empty subdirectories + for (int l1=0;l1<16;l1++) + { + QCString subdir; + subdir.sprintf("d%x",l1); + for (int l2=0;l2<256;l2++) + { + QCString subsubdir; + subsubdir.sprintf("d%x/d%02x",l1,l2); + if (d.exists(subsubdir.str()) && d.isEmpty(subsubdir.str())) + { + d.rmdir(subsubdir.str()); + } + } + if (d.exists(subdir.str()) && d.isEmpty(subdir.str())) + { + d.rmdir(subdir.str()); + } + } + } +} + /*! Input is a scopeName, output is the scopename split into a * namespace part (as large as possible) and a classname part. */ |