feat(file-index):文件moveTo时更新索引
This commit is contained in:
parent
769919d746
commit
4171fb84a4
|
@ -245,7 +245,8 @@ void IndexUpdater::updateAiIndex()
|
||||||
qDebug() << "| remove:" <<file.path();
|
qDebug() << "| remove:" <<file.path();
|
||||||
indexer.deleteFileIndex({file.path()});
|
indexer.deleteFileIndex({file.path()});
|
||||||
}
|
}
|
||||||
} else if(file.isModified()) {
|
} else if(file.isModified() || file.isMoveTo()) {
|
||||||
|
qDebug() << file.path() << "Modified.";
|
||||||
update(&AiIndexer::update);
|
update(&AiIndexer::update);
|
||||||
} else if(FileIndexerConfig::getInstance()->aiIndexFileTarget()[suffix] && !file.isDir()) {
|
} else if(FileIndexerConfig::getInstance()->aiIndexFileTarget()[suffix] && !file.isDir()) {
|
||||||
update(&AiIndexer::addTextFileIndex);
|
update(&AiIndexer::addTextFileIndex);
|
||||||
|
|
|
@ -72,9 +72,10 @@ bool PendingFile::shouldRemoveIndex() const
|
||||||
|
|
||||||
void PendingFile::merge(const PendingFile& file)
|
void PendingFile::merge(const PendingFile& file)
|
||||||
{
|
{
|
||||||
// m_created |= file.m_created;
|
m_created |= file.m_created;
|
||||||
m_modified = file.m_modified;
|
m_modified |= file.m_modified;
|
||||||
m_deleted = file.m_deleted;
|
m_deleted = file.m_deleted;
|
||||||
|
m_moveTo |= file.m_moveTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PendingFile::printFlags() const
|
void PendingFile::printFlags() const
|
||||||
|
|
Loading…
Reference in New Issue