Allow for XML .prop files on WebDAV in the future
This commit is contained in:
parent
2e93767c81
commit
ae52a05c3b
1 changed files with 15 additions and 2 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue