aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/actions
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/actions
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/actions')
-rw-r--r--apps/files/src/actions/deleteAction.ts2
-rw-r--r--apps/files/src/actions/moveOrCopyAction.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/src/actions/deleteAction.ts b/apps/files/src/actions/deleteAction.ts
index 18c18178cb7..f79872f1685 100644
--- a/apps/files/src/actions/deleteAction.ts
+++ b/apps/files/src/actions/deleteAction.ts
@@ -44,7 +44,7 @@ export const action = new FileAction({
async exec(node: Node) {
try {
- await axios.delete(node.source)
+ await axios.delete(node.encodedSource)
// Let's delete even if it's moved to the trashbin
// since it has been removed from the current view
diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts
index 51113f7ba31..52ad4f2868d 100644
--- a/apps/files/src/actions/moveOrCopyAction.ts
+++ b/apps/files/src/actions/moveOrCopyAction.ts
@@ -86,7 +86,7 @@ export const handleCopyMoveNodeTo = async (node: Node, destination: Folder, meth
}
const relativePath = join(destination.path, node.basename)
- const destinationUrl = generateRemoteUrl(`dav/files/${getCurrentUser()?.uid}${relativePath}`)
+ const destinationUrl = generateRemoteUrl(encodePath(`dav/files/${getCurrentUser()?.uid}${relativePath}`))
logger.debug(`${method} ${node.basename} to ${destinationUrl}`)
// Set loading state
@@ -97,7 +97,7 @@ export const handleCopyMoveNodeTo = async (node: Node, destination: Folder, meth
try {
await axios({
method: method === MoveCopyAction.COPY ? 'COPY' : 'MOVE',
- url: encodeURI(node.source),
+ url: node.encodedSource,
headers: {
Destination: encodeURI(destinationUrl),
Overwrite: overwrite ? undefined : 'F',