手动删除索引顶层目录时更新监听目录缓存

This commit is contained in:
iaom 2023-02-28 15:04:30 +08:00
parent e53d13c54b
commit 498147414d
1 changed files with 1 additions and 1 deletions

View File

@ -208,12 +208,12 @@ void FileSystemWatcher::addWatchWithBlackList(const QStringList &pathList, const
QStringList FileSystemWatcher::removeWatch(const QString &path) QStringList FileSystemWatcher::removeWatch(const QString &path)
{ {
return d->removeWatch(path);
for(QString watchedPath : d->m_watchedRootPaths) { for(QString watchedPath : d->m_watchedRootPaths) {
if(FileUtils::isOrUnder(watchedPath, path)) { if(FileUtils::isOrUnder(watchedPath, path)) {
d->m_watchedRootPaths.removeAll(watchedPath); d->m_watchedRootPaths.removeAll(watchedPath);
} }
} }
return d->removeWatch(path);
} }
void FileSystemWatcher::clearAll() void FileSystemWatcher::clearAll()