Skip to content

Commit

Permalink
Fix a couple issues with bundled file timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Jan 18, 2017
1 parent 2237c71 commit b62139e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chrome/content/zotero/xpcom/schema.js
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit b62139e

Please sign in to comment.