www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ae52a05c3bec76c62ee47e6c410e399803784f1f
parent 2e93767c81dfb9938b2af9ea05973d3060751d68
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 19 Sep 2009 10:50:22 +0000

Allow for XML .prop files on WebDAV in the future


Diffstat:
Mchrome/content/zotero/xpcom/storage/webdav.js | 17+++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js @@ -203,13 +203,26 @@ Zotero.Sync.Storage.Session.WebDAV.prototype._getStorageModificationTime = funct Zotero.debug(req.responseText); - var mtime = req.responseText; // No modification time set - if (!mtime) { + if (!req.responseText) { callback(item, false); return; } + try { + var xml = new XML(req.responseText); + } + catch (e) { + var xml = null; + } + if (xml && xml.childNodes.length()) { + // TODO: other stuff, but this makes us forward-compatible + mtime = xml.mtime.toString(); + } + else { + mtime = req.responseText; + } + var mdate = new Date(mtime * 1000); callback(item, mdate); });