[stable10] Fix folder upload race condition#29435
Conversation
Codecov Report
@@ Coverage Diff @@
## stable10 #29435 +/- ##
===========================================
Coverage 59.25% 59.25%
Complexity 17766 17766
===========================================
Files 1062 1062
Lines 59513 59513
===========================================
Hits 35264 35264
Misses 24249 24249Continue to review full report at Codecov.
|
When uploading the same folder twice, sometimes a race condition is triggered where some of the first uploaded items finish faster and trigger the "end of transfer" event even though there are further items to upload. This fix prevents the end of transfer event to clear the list of uploads so it can continue.
89a761f to
0d0d3d7
Compare
| path = this.getFile().name; | ||
| basePath = this.uploader.fileList.getCurrentDirectory(); | ||
| } | ||
| var path = OC.joinPaths(basePath, this.getFile().relativePath || '', this.getFile().name); |
There was a problem hiding this comment.
I'd rather move the this.getFile().relativePath || '' up to avoid the operation being evaluated in the function because it isn't common, but taking into account this is the only change I see for a backport, I'm fine to leave this as tech debt.
There was a problem hiding this comment.
Thanks. Considering that this isn't happening in a big loop I think this bit is acceptable.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Backport of #29393 to stable10