aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/fileinprojectfinder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/utils/fileinprojectfinder.cpp')
-rw-r--r--src/libs/utils/fileinprojectfinder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/utils/fileinprojectfinder.cpp b/src/libs/utils/fileinprojectfinder.cpp
index f92cb70fa7..6ee3c34bec 100644
--- a/src/libs/utils/fileinprojectfinder.cpp
+++ b/src/libs/utils/fileinprojectfinder.cpp
@@ -248,7 +248,10 @@ bool FileInProjectFinder::findFileOrDirectory(const FilePath &originalPath, File
}
}
while (prefixToIgnore != -1) {
- FilePath candidate = originalPath.resolvePath(m_projectDir);
+ QString candidateString = originalPath.toFSPathString();
+ candidateString.remove(0, prefixToIgnore);
+ candidateString.prepend(m_projectDir.toString());
+ const FilePath candidate = FilePath::fromString(candidateString);
const int matchLength = origLength - prefixToIgnore;
// FIXME: This might be a worse match than what we find later.
if (checkPath(candidate, matchLength, fileHandler, directoryHandler)) {