diff --git a/src/file/pendingfile.cpp b/src/file/pendingfile.cpp --- a/src/file/pendingfile.cpp +++ b/src/file/pendingfile.cpp @@ -77,7 +77,6 @@ m_attributesChanged |= file.m_attributesChanged; m_closedOnWrite |= file.m_closedOnWrite; m_created |= file.m_created; - m_deleted |= file.m_deleted; m_modified |= file.m_modified; } diff --git a/src/file/pendingfilequeue.cpp b/src/file/pendingfilequeue.cpp --- a/src/file/pendingfilequeue.cpp +++ b/src/file/pendingfilequeue.cpp @@ -76,6 +76,13 @@ m_cache.erase(droppedFilesBegin, end); } + if (file.shouldRemoveIndex()) { + m_cache.removeOne(file); + m_pendingFiles.remove(file.path()); + Q_EMIT removeFileIndex(file.path()); + return; + } + int i = m_cache.indexOf(file); if (i == -1) { m_cache << file; @@ -89,13 +96,7 @@ void PendingFileQueue::processCache(const QTime& currentTime) { for (const PendingFile& file : qAsConst(m_cache)) { - if (file.shouldRemoveIndex()) { - Q_EMIT removeFileIndex(file.path()); - - m_recentlyEmitted.remove(file.path()); - m_pendingFiles.remove(file.path()); - } - else if (file.shouldIndexXAttrOnly()) { + if (file.shouldIndexXAttrOnly()) { Q_EMIT indexXAttr(file.path()); } else if (file.shouldIndexContents()) {