diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-06-13 08:25:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-13 08:25:32 (GMT) |
commit | c9c102a9df33d10e653ee94d6a2579773ef759ad (patch) | |
tree | 9a4eb24e46b1a41e424bec29712e84bd60a7cdb5 /src/util.cpp | |
parent | 7536e3a858e3c94f0e2a2ece52208364fd4b92d6 (diff) | |
parent | 6372dd4dfb323ea10fda19b1a5bb09c5c94bf2fb (diff) | |
download | Doxygen-c9c102a9df33d10e653ee94d6a2579773ef759ad.zip Doxygen-c9c102a9df33d10e653ee94d6a2579773ef759ad.tar.gz Doxygen-c9c102a9df33d10e653ee94d6a2579773ef759ad.tar.bz2 |
Merge pull request #8595 from albert-github/feature/bug_674442
bug_674442 CREATE_FOLDERS should not create unused folders
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. */ |