-
Notifications
You must be signed in to change notification settings - Fork 806
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
Do not remove a folder that has files that were not uploaded yet during propagation #4268
Do not remove a folder that has files that were not uploaded yet during propagation #4268
Conversation
324c61f
to
2bdcada
Compare
The only way I was able to come up with, this is to fix the vector of What I am doing here is going through every item in the vector, checking if it is a new folder that we wish to re-upload (the folder that has new files will always be marked with reupload, because its ProcessDirectoryJob's Files and folders that are within the tree and are not new files, will get removed as planned. So, those are not affected. |
e60006f
to
630ae83
Compare
dde0865
to
4e10653
Compare
c801cf8
to
2d68954
Compare
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.
small comments or questions
if (itemRootFolderName.isEmpty()) { | ||
continue; | ||
} | ||
// #2 iterate backwords (for optimization) and find the root folder by name |
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.
are you sure ?
I would have expected the opposite
that in the items
container a
would be before a/b
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.
@mgallien You are right, the folder a
will go before folder a/b
because the container is sorted. That's why, to find the root of folder a/b/
, I must iterate backward to find the a
.
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.
OK but that is not necessarily what you achieve here
you are always using std::rbegin(items)
as starting point for the iteration so you will most probably iterate as many items as if you start from std::begin(items)
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.
@mgallien True! And, good catch. I will need to fix that.
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.
@matthieugallien Fixed
/rebase |
…ng propagation. Signed-off-by: alex-z <blackslayer4@gmail.com>
…ved on the server. Signed-off-by: alex-z <blackslayer4@gmail.com>
Signed-off-by: alex-z <blackslayer4@gmail.com>
… searching for parent. Signed-off-by: alex-z <blackslayer4@gmail.com>
537368f
to
bf80efc
Compare
SonarCloud Quality Gate failed. |
AppImage file: Nextcloud-PR-4268-bf80efc7ab826470a8dc156460a4c001ef7e8408-x86_64.AppImage |
/backport to stable-3.4 |
Signed-off-by: alex-z blackslayer4@gmail.com
This will fix #4265