Skip to content

Commit

Permalink
Files stayed in RTF directory
Browse files Browse the repository at this point in the history
In  Delay removing files in case of RTF till end of process (doxygen#10794 ) the removal of files of a successful RTF merge was handled though when e.g.:
```
RTF_OUTPUT = ./rtf
```
the files remained as the match didn't succeed, it is better to use the current directory (as here and in its subdirectories all files are located).
  • Loading branch information
albert-github committed Jun 5, 2024
1 parent 3ce1c91 commit dd56909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rtfgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,6 @@ void testRTFOutput(const QCString &name)
bool RTFGenerator::preProcessFileInplace(const QCString &path,const QCString &name)
{
static bool rtfDebug = Debug::isFlagSet(Debug::Rtf);
QCString rtfOutput = Config_getString(RTF_OUTPUT);

Dir d(path.str());
// store the original directory
Expand Down Expand Up @@ -2450,10 +2449,11 @@ bool RTFGenerator::preProcessFileInplace(const QCString &path,const QCString &na

testRTFOutput(mainRTFName);

QCString rtfOutputDir = Dir::currentDirPath();
for (auto &s : removeSet)
{
QCString s1(s.c_str());
if (s1.startsWith(rtfOutput)) Portable::unlink(s1);
if (s1.startsWith(rtfOutputDir)) Portable::unlink(s1);
}

Dir::setCurrent(oldDir);
Expand Down

0 comments on commit dd56909

Please sign in to comment.