Commit 8c980f5a authored by Tobias Hunger's avatar Tobias Hunger

VCS: Work with canonical paths when looking for toplevel directories

Change-Id: I2b2f3f76f04af298dcc6f38e1c5f1dd4555e2024
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent a1e3a5de
......@@ -209,7 +209,7 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
return 0;
// Make sure we a clean absolute path:
const QString directory = QDir(inputDirectory).absolutePath();
const QString directory = QDir(inputDirectory).canonicalPath();
VcsManagerPrivate::VcsInfo *cachedData = d->findInCache(directory);
if (cachedData) {
......@@ -242,7 +242,7 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
}
// Register Vcs(s) with the cache
QString tmpDir = directory;
QString tmpDir = QFileInfo(directory).canonicalFilePath();
const QChar slash = QLatin1Char('/');
const StringVersionControlPairs::const_iterator cend = allThatCanManage.constEnd();
for (StringVersionControlPairs::const_iterator i = allThatCanManage.constBegin(); i != cend; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment