Skip to content

Commit f51c3e0

Browse files
committed
Strip folders during DCE check.
1 parent 8b45bd9 commit f51c3e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/projectGenerator_dce.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ bool ProjectGenerator::outputProjectDCE(const StaticList& includeDirs)
7777
findPos2 += 10;
7878
findPos += 2;
7979
string templateFile = file.substr(findPos2, findPos - findPos2);
80-
// check if file contains current project
81-
uint projName = templateFile.find(m_projectName);
80+
// Split filename from any directory structures
81+
replace(templateFile.begin(), templateFile.end(), '\\', '/');
82+
uint projName = templateFile.rfind('/');
8283
if (projName != string::npos) {
83-
templateFile = templateFile.substr(projName + m_projectName.length() + 1);
84+
templateFile = templateFile.substr(projName + 1);
8485
}
8586
if (templateFile.length() >= 3) {
8687
string found;

0 commit comments

Comments
 (0)