From b3f44d023175779870176aca82de040818c93a4d Mon Sep 17 00:00:00 2001 From: "jonathandicarlo@jonathan-dicarlos-macbook-pro.local" Date: Fri, 19 Dec 2008 15:48:40 -0800 Subject: [PATCH] Major rehaul/simplification of the Fennec UI for connecting to your Weave account --- services/sync/modules/clientData.js | 16 ++++++++++++++-- services/sync/modules/service.js | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/services/sync/modules/clientData.js b/services/sync/modules/clientData.js index 9aad2d84330d..9066915d12e1 100644 --- a/services/sync/modules/clientData.js +++ b/services/sync/modules/clientData.js @@ -109,12 +109,24 @@ ClientDataSvc.prototype = { _refresh: function ClientData__refresh() { let self = yield; - let ret = yield DAV.MKCOL("meta", self.cb); + // No more such thing as DAV. I think this is making a directory. + // Will the directory now be handled automatically? (YES) + /* let ret = yield DAV.MKCOL("meta", self.cb); if(!ret) - throw "Could not create meta information directory"; + throw "Could not create meta information directory";*/ + // This fails horribly because this._remote._uri.spec is null. What's + // that mean? + // Spec is supposed to be just a string? + + // Probably problem has to do with Resource getting intialized by + // relative, not absolute, path? + // Use WBORecord (Weave Basic Object) from wbo.js? + this._log.debug("The URI is " + this._remote._uri); + this._log.debug("The URI.spec is " + this._remote._uri.spec); try { yield this._remote.get(self.cb); } catch (e if e.status == 404) { + this._log.debug("404ed. Using empty for remote data."); this._remote.data = {}; } diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index df0b5af4d1ec..b413a34b010e 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -428,7 +428,7 @@ WeaveSvc.prototype = { this.username = username; ID.get('WeaveID').setTempPassword(password); - + let id = new Identity('Passphrase Verification', username); id.setTempPassword(passphrase); @@ -541,7 +541,7 @@ WeaveSvc.prototype = { if (!(yield this._remoteSetup.async(this, self.cb))) { throw "aborting sync, remote setup failed"; } - + // TODO This right here. Make sure it works. //this._log.debug("Refreshing client list"); //yield ClientData.refresh(self.cb);