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