-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 bug introduced on drag and drop external files #28250
Conversation
32c7e54
to
e7f26d9
Compare
Apologies, had made a mistake in my assessment. Actually the issue was that the subdirectory had "/" at the beginning, and we were unable to create a model for it. Getting the last subdirectory in the path without the slash works. |
@skjnldsv Thanks for the help - it works great
Actually, disregard it all. Apparently the issue is just comparing with the current folder. The files do get properly compared against destination at some point, when I try to replace existing files there, just through another code path. |
Updated checkExistingFiles with the same conditions to not execute conflict check at that stage, as it'd compare with the incorrect file set. Should be good now. |
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.
Unfortunately jsunit is failing now, do you mind fixing that? :)
Definitely. It seems that my attempt at correcting the conflict check with the right folder is making a test fail. I thought that my commit earlier today had fixed it, but alas it didn't. I'm looking into it. Apologies for the hassle. |
So, I'd like some validation here as the way I fixed jsunit was to update the test - which is always awkward.
Since I am not fully familiar with this part of the code, I'd appreciate it if someone more knowledgeable than I am to confirm whether this is an adequate change for the test, or if I unknowingly now changed the test in a way that it no longer suits its intended purpose. Thank you. |
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder. This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder. Bug reports: - https://help.nextcloud.com/t/drag-drop-into-subfolders/120731 - nextcloud#24720 I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts. As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios. Please advise, happy to help improve this. Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com> Signed-off-by: pjft <pjft@users.noreply.github.com>
Hi all, Apologies for bothering once again. Is there anything pending on my end on this PR? I'm happy to hear that there hasn't been time to look into it, but I'd like some guidance as it's not sure whether I'm the one who's expecting to do something right now on it - and if so, what. Hope you're doing well, and keep up the great work! |
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.
Sorry for the delay here, can you address my comments? :)
@artonge definitely - thank you for taking the time. Let me know further thoughts - and definitely a preference on that code statement rewrite. Have a great day! :) |
Hi @artonge - apologies for bothering. Just received a notification from #29202 around this and came to check. It seems I'm still pending a change requested by you, and apparently another approver. I'm not sure you can approve, but if you or anyone else could help me navigate this it'd be very much appreciated. Thank you all, and keep up the great work :) |
Thanks for repinging and for the change @pjft ! And sorry for the delay in our review :) |
Not at al - thank you for taking the time. :) Regards. |
Backports? |
Happy to - I run this exact change on 21. What's the right process for it? |
/backport to stable22 |
/backport to stable21 |
Well, that was easy :D Thank you! |
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation here and it seems to fail for any subdirectory that doesn't belong to the root folder.
Bug reports:
I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.
As such, if my understanding is correct (please let me know if it isn't), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.
Please advise, happy to help improve this.