From 675630e18a62757602a6b819fea09ea47b4ba89c Mon Sep 17 00:00:00 2001 From: iaom <53137427+iaom@users.noreply.github.com> Date: Sat, 30 Jan 2021 16:32:46 +0800 Subject: [PATCH] Update inotify-index.cpp --- libsearch/index/inotify-index.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsearch/index/inotify-index.cpp b/libsearch/index/inotify-index.cpp index e17fb62..b6fae47 100644 --- a/libsearch/index/inotify-index.cpp +++ b/libsearch/index/inotify-index.cpp @@ -76,14 +76,14 @@ void InotifyIndex::DoSomething(const QFileInfo& fileInfo){ QQueue >* tempFile = new QQueue >; tempFile->enqueue(QVector() << fileInfo.fileName() << fileInfo.absoluteFilePath() << QString(fileInfo.isDir() ? "1" : "0")); IndexGenerator::getInstance()->creatAllIndex(tempFile); - if (!tempFile) + if (tempFile) delete tempFile; for (auto i : this->targetFileTypeVec){ if (fileInfo.fileName().endsWith(i)){ QQueue* tempContent = new QQueue; tempContent->enqueue(fileInfo.absoluteFilePath()); IndexGenerator::getInstance()->creatAllIndex(tempContent); - if (!tempContent) + if (tempContent) delete tempContent; } }