Reset storageModTime to 0 if < 0 and prevent setting < 0, though it shouldn't happen to begin with
This commit is contained in:
parent
f2a3545718
commit
5c1ffd1e2f
3 changed files with 11 additions and 1 deletions
|
@ -2443,6 +2443,10 @@ Zotero.Schema = new function(){
|
||||||
Zotero.DB.query("UPDATE itemNotes SET sourceItemID=NULL WHERE sourceItemID=itemID");
|
Zotero.DB.query("UPDATE itemNotes SET sourceItemID=NULL WHERE sourceItemID=itemID");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i==61) {
|
||||||
|
Zotero.DB.query("UPDATE itemAttachments SET storageModTime=NULL WHERE storageModTime<0");
|
||||||
|
}
|
||||||
|
|
||||||
Zotero.wait();
|
Zotero.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,6 +343,12 @@ Zotero.Sync.Storage = new function () {
|
||||||
* attachment item
|
* attachment item
|
||||||
*/
|
*/
|
||||||
this.setSyncedModificationTime = function (itemID, mtime, updateItem) {
|
this.setSyncedModificationTime = function (itemID, mtime, updateItem) {
|
||||||
|
if (mtime < 0) {
|
||||||
|
Components.utils.reportError("Invalid file mod time " + mtime
|
||||||
|
+ " in Zotero.Storage.setSyncedModificationTime()");
|
||||||
|
mtime = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Zotero.DB.beginTransaction();
|
Zotero.DB.beginTransaction();
|
||||||
|
|
||||||
var sql = "UPDATE itemAttachments SET storageModTime=? WHERE itemID=?";
|
var sql = "UPDATE itemAttachments SET storageModTime=? WHERE itemID=?";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
-- 60
|
-- 61
|
||||||
|
|
||||||
-- This file creates tables containing user-specific data for new users --
|
-- This file creates tables containing user-specific data for new users --
|
||||||
-- any changes made here must be mirrored in transition steps in schema.js::_migrateSchema()
|
-- any changes made here must be mirrored in transition steps in schema.js::_migrateSchema()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue