Skip to content

Commit

Permalink
feat: use fileId when renaming current folder
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Oct 5, 2022
1 parent bc85e90 commit bf63c45
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/web-app-files/src/mixins/actions/rename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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 })
Expand Down

0 comments on commit bf63c45

Please sign in to comment.