commit abf53e07ce64764f5d95d8666efbeec62383b6a8
parent e828ea6fa673d9895eb2779f9e639fe8344a7408
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 15 Sep 2009 08:57:20 +0000
- Fix sync error with empty WebDAV URL
- Fix Verify Server hang with empty WebDAV URL
Diffstat:
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -79,7 +79,9 @@ Zotero.Sync.Storage = new function () {
return;
}
if (!_session.initFromPrefs()) {
- _error("Module not initialized");
+ Zotero.debug(_session.name + " module not initialized");
+ _callbacks.onSkip();
+ return;
}
if (!_session.active) {
@@ -639,10 +641,8 @@ Zotero.Sync.Storage = new function () {
this.checkServer = function (module, callback) {
- _session = new Zotero.Sync.Storage.Session(module, { onError: _error });
- if (!_session.initFromPrefs()) {
- _error("Module not initialized");
- }
+ _session = new Zotero.Sync.Storage.Session(module, { onError: callback });
+ _session.initFromPrefs();
_session.checkServer(callback);
}
diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js
@@ -163,6 +163,9 @@ Zotero.Sync.Storage.Session.WebDAV.prototype.initFromPrefs = function () {
}
var url = Zotero.Prefs.get('sync.storage.url');
+ if (!url) {
+ return false;
+ }
url = scheme + '://' + url;
var dir = "zotero";