Skip to content

Commit

Permalink
Fix root path for folder uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Dec 4, 2020
1 parent 7aed46f commit 31bb55f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions apps/files/src/components/FilesAppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div id="files-app-bar" class="oc-app-bar">
<file-drop
v-if="!isIE11() && canUpload && hasFreeSpace"
:root-path="currentPathOrRoot"
:root-path="currentPath"
:path="currentPath"
:headers="headers"
@success="onFileSuccess"
Expand Down Expand Up @@ -50,7 +50,7 @@
/>
<folder-upload
v-if="!isIE11()"
:root-path="currentPathOrRoot"
:root-path="currentPath"
:path="currentPath"
:headers="headers"
@success="onFileSuccess"
Expand Down Expand Up @@ -214,10 +214,11 @@ export default {
return null
},
currentPath() {
return this.$route.params.item || ''
},
currentPathOrRoot() {
return this.currentPath === '' ? '/' : this.currentPath
const path = this.$route.params.item || ''
if (path.endsWith('/')) {
return path
}
return path + '/'
},
currentPathSegments() {
// remove potential leading and trailing slash from current path (so that the resulting array doesn't start with an empty string)
Expand Down

0 comments on commit 31bb55f

Please sign in to comment.