Minixed
Minixed copied to clipboard
Filesizes reporting as negative amounts
Currently any file over 2GB in size displays as a negative number. Looking into it myself I believe this is an issue with PHP itself but I think you'd know better than me! I've attached an image of the issue.
Unfortunately this is a PHP issue with filesize() returning 32-bit integers, and there's no easy workaround. /cc @urack
I'll look into @jkuchar's BigFileTools, but I don't think I'll add a whole composer dependency just for that. Maybe I can borrow some of the code and make something smaller into my script.
PRs are welcome, obviously.
BigFileTools support only getting filesize. If you want to get filesize in a cross-platform manner, I recommend including BigFileTools as a dependency as different platforms behave differently (that is why BFT has drivers)
(Version 1 is more lightweight - https://github.com/jkuchar/BigFileTools/tree/1.1.3)
@jkuchar Thank you very much. Version 1 looks like all I need, and the fact that is all in one file makes it a good candidate.
Any progress with this issue?
You can still install this onto 64-bit machine and 64-bit php and you get it working now. ;-)
Sorry, I didn't have time to work on it. The idea was to use BFT version 1, so... PRs are welcome.
I'm still very interested in a solution to this...
Simple - use 64-bit PHP. ;)
Unfortunately that does not resolve the issue.