Skip to content

Commit

Permalink
Fix parent folder rename
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Mar 21, 2022
1 parent df1e953 commit bc67f4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-rename-parent
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Rename parent folder

We fixed the rename option in the parent folder / breadcrumb context menu. It was broken due to malformed webdav paths.

https://github.com/owncloud/web/issues/6516
https://github.com/owncloud/web/pull/6631
5 changes: 4 additions & 1 deletion packages/web-app-files/src/mixins/actions/rename.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export default {
async $_rename_trigger({ resources }) {
let parentResources
if (isSameResource(resources[0], this.currentFolder)) {
const parentPaths = getParentPaths(resources[0].path, false)
const prefix = resources[0].webDavPath.slice(0, -resources[0].path.length)
const parentPaths = getParentPaths(resources[0].path, false).map((path) => {
return prefix + path
})
parentResources = await this.$client.files.list(parentPaths[0], 1)
parentResources = parentResources.map(buildResource)
}
Expand Down

0 comments on commit bc67f4b

Please sign in to comment.