-
-
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
Do not cast sizes to int in Trashbin class #38703
Conversation
This helps with 32bits support Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
/backport to stable27 |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
Are ypu really Sure to allow filesizes to be float? It can only represent 24bit filesizes accurately on 32 bit systems. Every filesize bigger will ge an error, which gets bigger with bigger filesizes. On can argue that for the trashbin size this might be OK, but for concrete files I doubt it. |
This is not a choice, this is how PHP works on 32bits. Any int bigger than what an int can contain is casted into a float. This causes type errors as soon as a file is bigger than 4G, or in this case when empty space in the Trashbin is bigger than 4G, which happens quite often. |
This helps with 32bits support
It should fix failing CI: https://github.com/nextcloud/server/actions/workflows/phpunit-32bits.yml
Checklist