1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-26 07:39:04 +02:00

Modified WebDav save destination to work correctly with relative and root paths, removing any URL paramaters

This commit is contained in:
Tim Stallard 2016-11-13 21:39:05 +00:00
parent 52701af6d6
commit c89ba02466

View File

@ -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,