Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果分析文件路径里,包含root文件名,则不会正常生成分析结果 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions trunk/common/filedepend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ CCodeFile* CFileDependTable::FindShortestPath(const std::vector<CCodeFile*>& vec

bool CFileDependTable::CreateFileDependTree(const std::vector<std::string> &paths, const std::vector<std::string> &includePaths, const std::vector<std::string>& excludesPaths)
{
m_pRoot = new CFolder("root");
m_pRoot = new CFolder("");
std::vector<std::string>::const_iterator iterBegin = paths.begin();
std::vector<std::string>::const_iterator iterEnd = paths.end();
for (std::vector<std::string>::const_iterator iter = iterBegin; iter != iterEnd; iter++)
Expand Down Expand Up @@ -921,7 +921,7 @@ std::string CFileBase::GetFullPath()
{
std::string sFullPath = GetName();
CFileBase* pFile = GetParent();
while (pFile && pFile->GetName() != "root")
while (pFile)
{
sFullPath = pFile->GetName() + "/" + sFullPath;
pFile = pFile->GetParent();
Expand Down