Fix a couple issues with bundled file timestamps

This commit is contained in:
Dan Stillman 2017-01-17 21:48:30 -05:00
parent 2237c71dcb
commit b62139ed0a

View file

@ -681,6 +681,10 @@ Zotero.Schema = new function(){
//
var sql = "SELECT version FROM version WHERE schema=?";
var lastModTime = yield Zotero.DB.valueQueryAsync(sql, mode);
// Fix millisecond times (possible in 4.0?)
if (lastModTime > 9999999999) {
lastModTime = Math.round(lastModTime / 1000);
}
var cache = {};
// XPI installation
@ -718,7 +722,7 @@ Zotero.Schema = new function(){
for (let i = 0; i < dbCache.length; i++) {
let metadata = JSON.parse(dbCache[i]);
let id = metadata.translatorID;
if (index[id] && index[id].lastUpdated == metadata.lastUpdated) {
if (index[id] && index[id].lastUpdated <= metadata.lastUpdated) {
index[id].extract = false;
}
}