修复索引关闭时取消监听不完全的问题。
This commit is contained in:
parent
539dd6529b
commit
1135c48abf
|
@ -225,7 +225,10 @@ void InotifyWatch::run()
|
||||||
qDebug() << "Leave watch loop";
|
qDebug() << "Leave watch loop";
|
||||||
if(FileUtils::SearchMethod::DIRECTSEARCH == FileUtils::searchMethod) {
|
if(FileUtils::SearchMethod::DIRECTSEARCH == FileUtils::searchMethod) {
|
||||||
IndexStatusRecorder::getInstance()->setStatus(INOTIFY_NORMAL_EXIT, "3");
|
IndexStatusRecorder::getInstance()->setStatus(INOTIFY_NORMAL_EXIT, "3");
|
||||||
removeWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation), false);
|
for(QString path : currentPath) {
|
||||||
|
inotify_rm_watch(m_inotifyFd, currentPath.key(path));
|
||||||
|
}
|
||||||
|
currentPath.clear();
|
||||||
}
|
}
|
||||||
close(m_inotifyFd);
|
close(m_inotifyFd);
|
||||||
// fcntl(m_inotifyFd, F_SETFD, FD_CLOEXEC);
|
// fcntl(m_inotifyFd, F_SETFD, FD_CLOEXEC);
|
||||||
|
|
Loading…
Reference in New Issue