mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
xapian indexisold function adjusted
This commit is contained in:
parent
e2a55e3f8f
commit
c930687055
|
@ -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(){
|
||||||
|
|
Loading…
Reference in a new issue