-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix restore files full path #6938
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
b48833a
to
8e0ca21
Compare
Kudos, SonarCloud Quality Gate passed! |
Please see last comment in the linked issue, there is one 'edge' case that I have no idea how to fix :/ |
Results for oC10SharingAndTrashbin https://drone.owncloud.com/owncloud/web/25511/34/1 💥 The acceptance tests pipeline failed. The build has been cancelled. |
for (const folder of foldersToRestore) { | ||
await this.$client.files.createFolder(buildWebDavFilesPath(this.user.id, folder)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work with deep nested folders yet. Let's say you have the following folder structure: level1/level2/level3
. foldersToRestore
would be an array including all folders: ['level1', 'level2', 'level3']
. By just looping through them you will create those in a flat hierarchy.
You will have to add the created folders to the path you pass to createFolder()
. E.g. first call createFolder('level1')
, next createFolder('level1/level2')
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes you are right, but want to make sure the edge case commented in the issue is cleared, do you maybe have an idea/understand what the problem there is :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've commented in #1753 (comment). Quiet a nasty edge case :(
Description
See #1753
! SEE LAST COMMENT PLEASE !
Types of changes
Checklist: