summaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntry.vue
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-10-03 16:49:49 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-10-03 18:11:03 +0200
commitd79e26b25a4a5f3e692439d9ab913f0e078a7785 (patch)
tree79e5a22946221d9d5f873040e00431809daba239 /apps/files/src/components/FileEntry.vue
parent8f30f976425d6ee933cfc47cb5ed82d827ff5106 (diff)
downloadnextcloud-server-d79e26b25a4a5f3e692439d9ab913f0e078a7785.tar.gz
nextcloud-server-d79e26b25a4a5f3e692439d9ab913f0e078a7785.zip
fix(files): encoded source path on actions requests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/components/FileEntry.vue')
-rw-r--r--apps/files/src/components/FileEntry.vue7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue
index fc7c0a4af51..275e8bb3aef 100644
--- a/apps/files/src/components/FileEntry.vue
+++ b/apps/files/src/components/FileEntry.vue
@@ -845,7 +845,7 @@ export default Vue.extend({
// Rename and move the file
async onRename() {
const oldName = this.source.basename
- const oldSource = this.source.source
+ const oldEncodedSource = this.source.encodedSource
const newName = this.newName.trim?.() || ''
if (newName === '') {
showError(this.t('files', 'Name cannot be empty'))
@@ -870,12 +870,13 @@ export default Vue.extend({
// Update node
this.source.rename(newName)
+ logger.debug('Moving file to', { destination: this.source.encodedSource, oldEncodedSource })
try {
await axios({
method: 'MOVE',
- url: oldSource,
+ url: oldEncodedSource,
headers: {
- Destination: encodeURI(this.source.source),
+ Destination: this.source.encodedSource,
},
})