From 7f3ec894d2332a34d66467c98db5d941aa745e03 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 9 Oct 2009 07:53:54 +0000 Subject: [PATCH] Upgraded libraries all defaulted to WebDAV syncing, even if WebDAV URL was blank -- default to Zotero File Storage instead if no URL --- chrome/content/zotero/xpcom/schema.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 33bb17791..8dde0eda3 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -2454,13 +2454,19 @@ Zotero.Schema = new function(){ if (i==63) { Zotero.DB.query("ALTER TABLE itemAttachments ADD COLUMN storageHash TEXT"); - var protocol = Zotero.Prefs.get('sync.storage.protocol'); - if (protocol == 'webdav') { - Zotero.Prefs.set('sync.storage.scheme', 'http'); + var url = Zotero.Prefs.get('sync.storage.url'); + if (url) { + var protocol = Zotero.Prefs.get('sync.storage.protocol'); + if (protocol == 'webdav') { + Zotero.Prefs.set('sync.storage.scheme', 'http'); + } + else { + Zotero.Prefs.set('sync.storage.protocol', 'webdav'); + Zotero.Prefs.set('sync.storage.scheme', 'https'); + } } else { - Zotero.Prefs.set('sync.storage.protocol', 'webdav'); - Zotero.Prefs.set('sync.storage.scheme', 'https'); + Zotero.Prefs.set('sync.storage.protocol', 'zotero'); } Zotero.DB.query("UPDATE version SET schema='storage_webdav' WHERE schema='storage'");