diff --git a/chrome/content/zotero/preferences/preferences_sync.js b/chrome/content/zotero/preferences/preferences_sync.js index 15f1679a9..8b4263e73 100644 --- a/chrome/content/zotero/preferences/preferences_sync.js +++ b/chrome/content/zotero/preferences/preferences_sync.js @@ -72,7 +72,7 @@ Zotero_Preferences.Sync = { } if (oldProtocol == 'zotero' && protocol == 'webdav') { - var sql = "SELECT COUNT(*) FROM version WHERE schema='storage_zfs'"; + var sql = "SELECT COUNT(*) FROM version WHERE schema LIKE 'storage_zfs%'"; if (Zotero.DB.valueQuery(sql)) { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js index cdad1f030..7ec6513a9 100644 --- a/chrome/content/zotero/xpcom/storage/zfs.js +++ b/chrome/content/zotero/xpcom/storage/zfs.js @@ -1043,6 +1043,10 @@ Zotero.Sync.Storage.ZFS = (function () { */ obj._purgeDeletedStorageFiles = function () { return Q.fcall(function () { + // Cache the credentials at the root + return self._cacheCredentials(); + }.bind(this)) + then(function () { // If we don't have a user id we've never synced and don't need to bother if (!Zotero.userID) { return false;