mirror of https://github.com/keeweb/keeweb.git
Revert "fix #1154: relative Destination header in WebDAV MOVE"
This reverts commit cbbf5f83
fix #1259
This commit is contained in:
parent
1b64dd6d56
commit
ef7ae9ada9
|
@ -178,10 +178,15 @@ const StorageWebDav = StorageBase.extend({
|
|||
return cb({ revConflict: true }, xhr, stat);
|
||||
}
|
||||
let movePath = path;
|
||||
if (movePath.includes('://')) {
|
||||
movePath = movePath.replace(/^\w+:\/\/[^\/]+/, '');
|
||||
} else if (!movePath.startsWith('/')) {
|
||||
movePath = location.pathname.replace(/[^/]*$/, movePath);
|
||||
if (movePath.indexOf('://') < 0) {
|
||||
if (movePath.indexOf('/') === 0) {
|
||||
movePath =
|
||||
location.protocol + '//' + location.host + movePath;
|
||||
} else {
|
||||
movePath = location.href
|
||||
.replace(/\?(.*)/, '')
|
||||
.replace(/[^/]*$/, movePath);
|
||||
}
|
||||
}
|
||||
that._request(
|
||||
_.defaults(
|
||||
|
|
Loading…
Reference in New Issue