Minixed icon indicating copy to clipboard operation
Minixed copied to clipboard

Filesizes reporting as negative amounts

Open CodyWarmbo-zz opened this issue 8 years ago • 9 comments
trafficstars

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. capture

CodyWarmbo-zz avatar Mar 08 '17 20:03 CodyWarmbo-zz

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.

lorenzos avatar Jun 14 '17 12:06 lorenzos

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 avatar Jun 16 '17 13:06 jkuchar

@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.

lorenzos avatar Jun 16 '17 15:06 lorenzos

Any progress with this issue?

NaruZosa avatar Feb 25 '18 12:02 NaruZosa

You can still install this onto 64-bit machine and 64-bit php and you get it working now. ;-)

jkuchar avatar Feb 26 '18 15:02 jkuchar

Sorry, I didn't have time to work on it. The idea was to use BFT version 1, so... PRs are welcome.

lorenzos avatar Feb 26 '18 18:02 lorenzos

I'm still very interested in a solution to this...

codywarmbo avatar Apr 10 '19 01:04 codywarmbo

Simple - use 64-bit PHP. ;)

jkuchar avatar Apr 10 '19 08:04 jkuchar

Unfortunately that does not resolve the issue.

codywarmbo avatar Apr 10 '19 15:04 codywarmbo