xapian indexisold function adjusted

This commit is contained in:
Xiao YiFang 2022-10-08 21:02:52 +08:00
parent e2a55e3f8f
commit c930687055

View file

@ -572,23 +572,13 @@ bool needToRebuildIndex( vector< string > const & dictionaryFiles,
if(d.exists()){ if(d.exists()){
d.removeRecursively(); d.removeRecursively();
} }
#endif
QFileInfo fileInfo( FsEncoding::decode( indexFile.c_str() ) ); QFileInfo fileInfo( FsEncoding::decode( indexFile.c_str() ) );
if ( !fileInfo.exists() ) if ( !fileInfo.exists() )
return true; return true;
return fileInfo.lastModified().toSecsSinceEpoch() < lastModified; return fileInfo.lastModified().toSecsSinceEpoch() < lastModified;
#else
QFileInfo fileInfo( FsEncoding::decode( indexFile.c_str() ) );
if ( fileInfo.exists()&&fileInfo.isFile() )
{
QFile::remove(FsEncoding::decode( indexFile.c_str() ));
return true;
}
return false;
#endif
} }
string getFtsSuffix(){ string getFtsSuffix(){