Skip to content

Commit 81f8968

Browse files
committed
Fix makeFileGeneratorRelative when solution and project dir are identical.
1 parent 619d41c commit 81f8968

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/configGenerator.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,10 @@ void ConfigGenerator::makeFileGeneratorRelative(const string& fileName, string&
967967
path = fileName.substr(0, pos);
968968
file = fileName.substr(pos);
969969
}
970-
makePathsRelative(m_solutionDirectory + path, "./", retFileName);
970+
if (path != m_solutionDirectory) {
971+
path = m_solutionDirectory + path;
972+
}
973+
makePathsRelative(path, "./", retFileName);
971974
// Check if relative to current dir
972975
if (retFileName.find("./") == 0) {
973976
retFileName = retFileName.substr(2);

0 commit comments

Comments
 (0)