Skip to content

Commit 66f54c5

Browse files
author
William Jakobsson
committed
fix
1 parent 8c14fc7 commit 66f54c5

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
@@ -1699,8 +1699,10 @@ void ImportProject::setRelativePaths(const std::string &filename)
16991699
const std::vector<std::string> basePaths{Path::fromNativeSeparators(Path::getCurrentPath())};
17001700
for (auto &fs: fileSettings) {
17011701
fs.file.setPath(Path::getRelativePath(fs.filename(), basePaths));
1702-
for (auto &includePath: fs.includePaths)
1703-
includePath = Path::getRelativePath(includePath, basePaths);
1702+
for (auto &includePath: fs.includePaths) {
1703+
const std::string rel = Path::getRelativePath(includePath, basePaths);
1704+
includePath = rel.empty() ? "." : rel;
1705+
}
17041706
}
17051707
}
17061708

0 commit comments

Comments
 (0)