fix(discovery): check quota before upload (during discovery)#9777
fix(discovery): check quota before upload (during discovery)#9777
Conversation
114c6ee to
1f866cb
Compare
091d2a9 to
399b158
Compare
|
|
sorry for the mess |
399b158 to
e425898
Compare
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
e425898 to
dcb2b54
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-9777.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
|
Every remaining SonarCloud issues are pre-existing code that SonarQube is classifying as "new" because our modifications shifted line numbers of otherwise untouched code into its diff window. The Quality Gate cannot be cleared by fixing code in this PR. |




Fixes #4580 (more an enhancement of actual behavior)
Related to nextcloud/server#51977
Related to nextcloud/server#59398
Quota is now checked during discovery, before any data is transmitted. If a file exceeds available quota it receives a
DetailErrorimmediately, with no retry scheduled. A_quotaBytesReservedcounter prevents multiple files from being approved when their combined size exceeds quota.The propagator's pre-upload guard is also improved: it now walks the folder hierarchy to find the nearest quota entry, and the propagator is seeded with PROPFIND quota data at the start of each cycle. Combined with nextcloud/server#59398 and nextcloud/groupfolders#4539 this makes this behavior almost full proof.
4 new tests cover: single file blocked, unknown quota allowed, chunked upload blocked, and two files exceeding combined quota.