Skip to content

Commit 20c7a16

Browse files
committed
Fixed problem where processing symlinks could result in ASSERT: "fd!=0"
1 parent 9824d2d commit 20c7a16

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/doxygen.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9918,19 +9918,21 @@ static void readDir(FileInfo *fi,
99189918
)
99199919
{
99209920
std::string name=cfi.fileName();
9921+
std::string path=cfi.dirPath()+"/";
9922+
std::string fullName=path+name;
99219923
if (fnMap)
99229924
{
9923-
std::unique_ptr<FileDef> fd { createFileDef(QCString(cfi.dirPath()+"/"),QCString(name)) };
9925+
std::unique_ptr<FileDef> fd { createFileDef(QCString(path),QCString(name)) };
99249926
FileName *fn=0;
99259927
if (!name.empty())
99269928
{
9927-
fn = fnMap->add(QCString(name),QCString(cfi.absFilePath()));
9929+
fn = fnMap->add(QCString(name),QCString(fullName));
99289930
fn->push_back(std::move(fd));
99299931
}
99309932
}
9931-
if (resultList) resultList->push_back(cfi.absFilePath());
9932-
if (resultSet) resultSet->insert(cfi.absFilePath());
9933-
if (killSet) killSet->insert(cfi.absFilePath());
9933+
if (resultList) resultList->push_back(fullName);
9934+
if (resultSet) resultSet->insert(fullName);
9935+
if (killSet) killSet->insert(fullName);
99349936
}
99359937
else if (recursive &&
99369938
(!Config_getBool(EXCLUDE_SYMLINKS) || !cfi.isSymLink()) &&

0 commit comments

Comments
 (0)