Skip to content

Commit cb3c542

Browse files
committed
issue #10473 doxygen hangs forever after "Building directory list..."
when one or more input (MarkDown) files' absolute path is larger than 260 chars
1 parent 7c072be commit cb3c542

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/dirdef.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,14 @@ DirDef *DirDefImpl::mergeDirectoryInTree(const QCString &path)
863863
while ((i=path.find('/',p))!=-1)
864864
{
865865
QCString part=path.left(i+1);
866-
if (!matchPath(part,Config_getList(STRIP_FROM_PATH)) && (part!="/" && part!="//"))
866+
if (!matchPath(part,Config_getList(STRIP_FROM_PATH)) && (part!="/" && part!="//" && part!="//?/"))
867867
{
868+
#if defined(_WIN32)
869+
if (part.startsWith("//?/")) // strip leading "\\?\" part from path
870+
{
871+
part=part.mid(4);
872+
}
873+
#endif
868874
dir=createNewDir(part);
869875
}
870876
p=i+1;
@@ -1004,11 +1010,12 @@ static void computeCommonDirPrefix()
10041010
for (const auto &dir : *Doxygen::dirLinkedMap)
10051011
{
10061012
QCString dirName = dir->name();
1013+
//printf("dirName='%s' (l=%d) path='%s' (l=%d)\n",qPrint(dirName),dirName.length(),qPrint(path),path.length());
10071014
if (dirName.length()>path.length())
10081015
{
10091016
if (dirName.left(l)!=path) // dirName does not start with path
10101017
{
1011-
i=path.findRev('/',l-2);
1018+
i = l>=2 ? path.findRev('/',l-2) : -1;
10121019
if (i==-1) // no unique prefix -> stop
10131020
{
10141021
path="";

0 commit comments

Comments
 (0)