From bf63c4578626a10ec7e0e8d71371173a90859eaa Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 4 Oct 2022 23:18:54 +0200 Subject: [PATCH] feat: use fileId when renaming current folder --- packages/web-app-files/src/mixins/actions/rename.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/web-app-files/src/mixins/actions/rename.ts b/packages/web-app-files/src/mixins/actions/rename.ts index 9ec2d60bc8b..0d09ced6dbc 100644 --- a/packages/web-app-files/src/mixins/actions/rename.ts +++ b/packages/web-app-files/src/mixins/actions/rename.ts @@ -5,6 +5,7 @@ import { Resource } from 'web-client' import { dirname, join } from 'path' import { WebDAV } from 'web-client/src/webdav' import { SpaceResource } from 'web-client/src/helpers' +import { createFileRouteOptions } from '../../router/utils' export default { computed: { @@ -192,12 +193,12 @@ export default { this.hideModal() if (isSameResource(resource, this.currentFolder)) { - return this.$router.push({ - params: { - driveAliasAndItem: this.space.getDriveAliasAndItem({ path: newPath } as Resource) - }, - query: this.$route.query - }) + return this.$router.push( + createFileRouteOptions(this.space, { + path: newPath, + fileId: resource.fileId + }) + ) } this.RENAME_FILE({ space, resource, newPath })