Skip to content

Commit 77ac3ce

Browse files
author
William Jakobsson
committed
fix
1 parent 91ceb73 commit 77ac3ce

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/importproject.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,8 +1698,10 @@ void ImportProject::setRelativePaths(const std::string &filename)
16981698
const std::vector<std::string> basePaths{Path::fromNativeSeparators(Path::getCurrentPath())};
16991699
for (auto &fs: fileSettings) {
17001700
fs.file.setPath(Path::getRelativePath(fs.filename(), basePaths));
1701-
for (auto &includePath: fs.includePaths)
1702-
includePath = Path::getRelativePath(includePath, basePaths);
1701+
for (auto &includePath: fs.includePaths) {
1702+
const std::string rel = Path::getRelativePath(includePath, basePaths);
1703+
includePath = rel.empty() ? "." : rel;
1704+
}
17031705
}
17041706
}
17051707

0 commit comments

Comments
 (0)