[修复]:修复文件与目录监听接口中,对于常规文件监听时无法进行递归子目录的bug
This commit is contained in:
parent
f30889f7ee
commit
7bf51af1dc
|
@ -470,15 +470,9 @@ QStringList FileWatcher::getChildFile(QString parent, int depth, int maxdepth, i
|
|||
return res;
|
||||
|
||||
if (recurType & HIDDEN)
|
||||
if (recurType & DIR)
|
||||
dir.setFilter(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot|QDir::Hidden);
|
||||
else
|
||||
dir.setFilter(QDir::Files|QDir::NoDotAndDotDot|QDir::Hidden);
|
||||
else
|
||||
if (recurType & DIR)
|
||||
dir.setFilter(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot);
|
||||
else
|
||||
dir.setFilter(QDir::Files);
|
||||
|
||||
dir.setSorting(QDir::DirsFirst);
|
||||
|
||||
|
@ -511,7 +505,8 @@ QStringList FileWatcher::getChildFile(QString parent, int depth, int maxdepth, i
|
|||
sprintf(buf, "%s is dir, search for it's subfile.\n", finfo.absoluteFilePath().toStdString().c_str());
|
||||
logfile.write(buf);
|
||||
res.append(this->getChildFile(finfo.absoluteFilePath(), depth + 1, maxdepth));
|
||||
res.append(finfo.absoluteFilePath());
|
||||
if (recurType & DIR)
|
||||
res.append(finfo.absoluteFilePath());
|
||||
sprintf(buf, "append %s\n", finfo.absoluteFilePath().toStdString().c_str());
|
||||
logfile.write(buf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue