GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
From libraries/joomla/filesystem/file.php, lines 379-380:
// Beef up the chunk size to a meg
$stream->set('chunksize', (1024 * 1024 * 1024));
Does anyone else see a problem with this?
one too many 1024's
No, that's not it. 'gig' is misspelled.
Well, I think what was meant here was what the comment is saying. Since this is regarding writing files using streams, and by default the chunksize is set to 8KB, I think it's reasonable to assume that there are - as @pasamio said - one too many 1024's.
What we really need to do is ask the creator if he meant what he coded, or if he meant what he commented. This chunk of code was added here -
Merge pull request #1655 from dongilbert/chunkfix
Incorrect chunksize calculation. Fixes Issue #1562
This can be closed