www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit b62139ed0a66d29b5f648ecad595bb2154a7bd85
parent 2237c71dcbaf52b8b51543febe419ea2f88234bf
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 17 Jan 2017 21:48:30 -0500

Fix a couple issues with bundled file timestamps

Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -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; } }