forked from qt-creator/qt-creator
VcsManager: Clear topLevel directory when necessary
Clear the topLevelDirectory when being asked to find the version control system responsible for directory "". Change-Id: I8806ebff1200f0fc936715ffab94acf1f10cb386 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -233,8 +233,11 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
|
||||
{
|
||||
typedef QPair<QString, IVersionControl *> StringVersionControlPair;
|
||||
typedef QList<StringVersionControlPair> StringVersionControlPairs;
|
||||
if (inputDirectory.isEmpty())
|
||||
if (inputDirectory.isEmpty()) {
|
||||
if (topLevelDirectory)
|
||||
topLevelDirectory->clear();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Make sure we an absolute path:
|
||||
const QString directory = QDir(inputDirectory).absolutePath();
|
||||
|
||||
Reference in New Issue
Block a user