From: Dirk H Bartley Date: Thu, 11 Jun 2009 00:39:06 +0000 (+0000) Subject: When looking at what got backed up from a windows differential, found a bug X-Git-Tag: Release-3.0.2~174 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6954700c7329d526c052aaad608314d345c720c9;p=bacula%2Fbacula When looking at what got backed up from a windows differential, found a bug where it would create many "Bases". This fixes it subtly. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8892 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/restore/restoretree.cpp b/bacula/src/qt-console/restore/restoretree.cpp index d19619823e..25624fbfa1 100644 --- a/bacula/src/qt-console/restore/restoretree.cpp +++ b/bacula/src/qt-console/restore/restoretree.cpp @@ -153,6 +153,8 @@ void restoreTree::updateRefresh() */ void restoreTree::populateDirectoryTree() { + m_debugTrap = true; + m_debugCnt = 0; m_slashTrap = false; m_dirPaths.clear(); directoryTree->clear(); @@ -350,10 +352,11 @@ void restoreTree::parseDirectory(QString &dir_in) .arg(dir_in.length()).arg(index).arg(path).arg(direct); Pmsg0(000, msg.toUtf8().data()); } - if (addDirectory(path, direct)) done = true; + if (addDirectory(path, direct)) { done = true; } else { - if ((mainWin->m_miscDebug) && (m_debugTrap)) + if ((mainWin->m_miscDebug) && (m_debugTrap)) { Pmsg0(000, "Saving for later\n"); + } pathAfter.prepend(path); dirAfter.prepend(direct); } @@ -407,6 +410,7 @@ bool restoreTree::addDirectory(QString &m_cwd, QString &newdirr) /* no need to check for windows drive if unix */ if (isWin32Path(m_cwd)) { if (!m_dirPaths.contains(m_cwd)) { + if (m_cwd.count('/') > 1) { return false; } /* this is a windows drive add the base widget */ QTreeWidgetItem *item = new QTreeWidgetItem(directoryTree); item->setText(0, m_cwd);