forked from qt-creator/qt-creator
Limit cdUp to root
Task-number: QTCREATORBUG-10860 Change-Id: I22550b4415e07cac0d78f36595dc7ee781a837c0 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
a3f30b3d17
commit
0a71091260
@@ -1328,7 +1328,7 @@ bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLe
|
||||
* furthest parent containing ".svn/wc.db". Need to check for furthest parent as closer
|
||||
* parents may be svn:externals. */
|
||||
QDir parentDir = dir;
|
||||
while (parentDir.cdUp()) {
|
||||
while (!parentDir.isRoot() && parentDir.cdUp()) {
|
||||
if (checkSVNSubDir(parentDir, QLatin1String("wc.db"))) {
|
||||
if (topLevel)
|
||||
*topLevel = parentDir.absolutePath();
|
||||
@@ -1344,7 +1344,9 @@ bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLe
|
||||
|
||||
if (topLevel) {
|
||||
QDir lastDirectory = dir;
|
||||
for (parentDir = lastDirectory; parentDir.cdUp() ; lastDirectory = parentDir) {
|
||||
for (parentDir = lastDirectory;
|
||||
!parentDir.isRoot() && parentDir.cdUp();
|
||||
lastDirectory = parentDir) {
|
||||
if (!checkSVNSubDir(parentDir)) {
|
||||
*topLevel = lastDirectory.absolutePath();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user