summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/src/actions/restoreAction.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/src/actions/restoreAction.ts')
-rw-r--r--apps/files_trashbin/src/actions/restoreAction.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_trashbin/src/actions/restoreAction.ts b/apps/files_trashbin/src/actions/restoreAction.ts
index d3e3f66a1df..f464602f01c 100644
--- a/apps/files_trashbin/src/actions/restoreAction.ts
+++ b/apps/files_trashbin/src/actions/restoreAction.ts
@@ -51,11 +51,14 @@ registerFileAction(new FileAction({
},
async exec(node: Node) {
+ const { origin } = new URL(node.source)
+ const encodedSource = origin + encodePath(node.source.slice(origin.length))
+
try {
const destination = generateRemoteUrl(encodePath(`dav/trashbin/${getCurrentUser()?.uid}/restore/${node.basename}`))
await axios({
method: 'MOVE',
- url: node.source,
+ url: encodedSource,
headers: {
destination,
},