Autogen: Fix ambiguity in header file detection on Windows
On Windows, CollapseFullPath
called with a path that ends with a dot
might return a file with the same base name but any extension.
To make sure we get only the file with the requested header extension,
pass the complete file name to CollapseFullPath
.
Fixes: #19892 (closed)