node xxx has no children and bat would interpret that as a directory.
This fixes it but it may not be the best solution.
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8870
91ce42f0-d328-0410-95d8-
f526ca767f89
m_console->write_dir(m_conn, "dir", false);
QList<QTreeWidgetItem *> treeItemList;
QStringList item;
+ m_rx.setPattern("has no children\\.$");
+ bool first = true;
while (m_console->read(m_conn) > 0) {
char *p = m_console->msg(m_conn);
char *l;
strip_trailing_junk(p);
- if (*p == '$' || !*p) {
- continue;
+ if (*p == '$' || !*p) { continue; }
+ if (first) {
+ if (m_rx.indexIn(QString(p)) != -1) { continue; }
+ first = false;
}
l = p;
skip_nonspaces(&p); /* permissions */
QString m_cwd;
QHash<QString, QTreeWidgetItem *> m_dirPaths;
QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
+ QRegExp m_rx;
};