commit 5442e2e8a8635f1de0ea54645a393caacaa898c5 parent bafad27311f3e51daf35d6ced23cd30a3c3de256 Author: Dan Stillman <dstillman@zotero.org> Date: Mon, 15 Apr 2013 22:21:54 -0400 Fix ZFS purging when switching to WebDAV Diffstat:
| M | chrome/content/zotero/preferences/preferences_sync.js | | | 2 | +- |
| M | chrome/content/zotero/xpcom/storage/zfs.js | | | 4 | ++++ |
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git 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 @@ -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;