diff options
author | Orgad Shaneh <[email protected]> | 2013-12-03 08:15:44 +0200 |
---|---|---|
committer | Orgad Shaneh <[email protected]> | 2013-12-03 14:42:07 +0100 |
commit | 0a7109126051fa13e6f2e27845897792a2ba24cb (patch) | |
tree | f715507b636bb772750b3c23dbcb4f1ec4c4c691 /src/plugins/cvs/cvsplugin.cpp | |
parent | a3f30b3d1712fb22180a89c5a6a128823c80fb79 (diff) |
Limit cdUp to root
Task-number: QTCREATORBUG-10860
Change-Id: I22550b4415e07cac0d78f36595dc7ee781a837c0
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/cvs/cvsplugin.cpp')
-rw-r--r-- | src/plugins/cvs/cvsplugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 9d4a8055f74..15826ba473c 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -1349,7 +1349,9 @@ bool CvsPlugin::managesDirectory(const QString &directory, QString *topLevel /* * not have a "CVS" directory. The starting directory must be a managed * one. Go up and try to find the first unmanaged parent dir. */ QDir lastDirectory = dir; - for (QDir parentDir = lastDirectory; parentDir.cdUp() ; lastDirectory = parentDir) { + for (QDir parentDir = lastDirectory; + !parentDir.isRoot() && parentDir.cdUp(); + lastDirectory = parentDir) { if (!checkCVSDirectory(parentDir)) { *topLevel = lastDirectory.absolutePath(); break; |