Skip to content
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

Remove type hint for AbstractTrash.getSize() #17609

Closed

Conversation

scriptator
Copy link

Int is not large enough on 32 bit systems to represent the size of a large trash. This leads to errors when displaying the trash in the web.

See #13160

int is not large enough on 32 bit systems
see nextcloud#13160
@kesselb kesselb added 3. to review Waiting for reviews bug labels Oct 20, 2019
@kesselb kesselb added this to the Nextcloud 18 milestone Oct 20, 2019
@kesselb
Copy link
Contributor

kesselb commented Oct 20, 2019

As reference: #16636

@go2sh
Copy link
Contributor

go2sh commented Oct 20, 2019

The Problem with float is, that the Size loses its precision with a float type. The file size should never be represented by a float. I think the point where the float gets set should be fixed.

As far as I understand the problem 32bit systems are limited to 4G file size.

@scriptator
Copy link
Author

As far as I understand the problem 32bit systems are limited to 4G file size.

I don't know, but in this case a file size limit is irrelevant. The size of the trash is the sum of sizes of all files inside. That can easily exceed the 32 bit MAX int regardless of whether there is a size limit for individual files.

This was referenced Dec 11, 2019
@rullzer rullzer mentioned this pull request Dec 19, 2019
18 tasks
@go2sh
Copy link
Contributor

go2sh commented Dec 23, 2019

This seems to be the same problem as with the zipresponse. I might be a general problem to handle the integer overflow conversion to float.

This was referenced Dec 27, 2019
@rullzer rullzer modified the milestones: Nextcloud 18, Nextcloud 19 Jan 7, 2020
This was referenced Apr 4, 2020
This was referenced Apr 15, 2020
@rullzer rullzer mentioned this pull request Apr 23, 2020
11 tasks
@rullzer rullzer removed this from the Nextcloud 19 milestone Apr 24, 2020
@J0WI
Copy link
Contributor

J0WI commented Apr 28, 2021

See also #24137

@J0WI J0WI added the php Pull requests that update Php code label Apr 28, 2021
@kesselb
Copy link
Contributor

kesselb commented Apr 28, 2021

Thanks for sending a pull request 👍

I'm closing this pull request due inactivity.

@kesselb kesselb closed this Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants