fix #1729: prevent double encoding move path

This commit is contained in:
antelle 2021-03-05 21:16:12 +01:00
parent e107c5c108
commit 0d291afb05
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 6 additions and 2 deletions

View File

@ -209,6 +209,10 @@ class StorageWebDav extends StorageBase {
.replace(/[^/]*$/, movePath);
}
}
// prevent double encoding, see #1729
const encodedMovePath = /%[A-Z0-9]{2}/.test(movePath)
? movePath
: encodeURI(movePath);
this._request(
{
...saveOpts,
@ -217,7 +221,7 @@ class StorageWebDav extends StorageBase {
path: tmpPath,
nostat: true,
headers: {
Destination: encodeURI(movePath),
Destination: encodedMovePath,
'Overwrite': 'T'
}
},

View File

@ -21,7 +21,7 @@ const Features = {
return isDesktop && (this.isMac || this.isWindows);
},
renderCustomTitleBar() {
return isDesktop && this.isWindows;
return isDesktop && (this.isMac || this.isWindows); // revert me
},
hasUnicodeFlags() {
return this.isMac;