]> git.sur5r.net Git - bacula/bacula/commitdiff
When looking at what got backed up from a windows differential, found a bug
authorDirk H Bartley <dbartley@schupan.com>
Thu, 11 Jun 2009 00:39:06 +0000 (00:39 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Thu, 11 Jun 2009 00:39:06 +0000 (00:39 +0000)
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

bacula/src/qt-console/restore/restoretree.cpp

index d19619823e7bb19c718237fcd46524e1b9c63f21..25624fbfa14f1c581badec7021cd8cc8a6fd697b 100644 (file)
@@ -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);