mirror of https://github.com/keeweb/keeweb.git
Modified WebDav save destination to work correctly with relative and root paths, removing any URL paramaters
This commit is contained in:
parent
52701af6d6
commit
c89ba02466
|
@ -86,7 +86,11 @@ var StorageWebDav = StorageBase.extend({
|
|||
}
|
||||
var movePath = path;
|
||||
if (movePath.indexOf('://') < 0) {
|
||||
movePath = location.href.replace(/[^/]*$/, movePath);
|
||||
if (movePath.indexOf('/') === 0) {
|
||||
movePath = location.protocol + '//' + location.host + movePath;
|
||||
} else {
|
||||
movePath = location.href.replace(/\?(.*)/, '').replace(/[^/]*$/, movePath);
|
||||
}
|
||||
}
|
||||
that._request(_.defaults({
|
||||
op: 'Save:move', method: 'MOVE', path: tmpPath, nostat: true,
|
||||
|
|
Loading…
Reference in New Issue