mirror of https://github.com/keeweb/keeweb.git
fix #205: webdav relative url error
This commit is contained in:
parent
6ba0808c17
commit
f80a9ff1ad
|
@ -84,9 +84,13 @@ var StorageWebDav = StorageBase.extend({
|
|||
that._request(_.defaults({ op: 'Save:delete', method: 'DELETE', path: tmpPath }, saveOpts));
|
||||
return cb({ revConflict: true }, xhr, stat);
|
||||
}
|
||||
var movePath = path;
|
||||
if (movePath.indexOf('://') < 0) {
|
||||
movePath = location.href.replace(/[^/]*$/, movePath);
|
||||
}
|
||||
that._request(_.defaults({
|
||||
op: 'Save:move', method: 'MOVE', path: tmpPath, nostat: true,
|
||||
headers: { Destination: path, 'Overwrite': 'T' }
|
||||
headers: { Destination: movePath, 'Overwrite': 'T' }
|
||||
}, saveOpts), function(err) {
|
||||
if (err) { return cb(err); }
|
||||
that._request(_.defaults({
|
||||
|
|
Loading…
Reference in New Issue