WeiDUorg / weidu

WeiDU is a program used to develop, distribute and install modifications for games based on the Infinity Engine.
http://www.weidu.org
GNU General Public License v2.0
90 stars 20 forks source link

GET_FILE_ARRAY/GET_DIRECTORY_ARRAY: not working with files of size > 1 GB #119

Open Argent77 opened 6 years ago

Argent77 commented 6 years ago

Both GET_FILE_ARRAY and GET_DIRECTORY_ARRAY are causing mod installations to fail when they encounter files of size >= 1 GB in their search path.

Example:

// Code:
GET_FILE_ARRAY files ~dlc~ ~.+\.zip~

// Resulting error message:
ERROR: Unix.Unix_error(67, "stat", "dlc/sod-dlc.zip")

Size of sod-dlc.zip is about 1.8 GB.

FredrikLindgren commented 6 years ago

Yes, there appears to be a number of remaining uses of unix_stat that could potentially fail on large files. I'll try to look it over during the week.

Argent77 commented 6 years ago

Just a note: 64-bit binaries appear to work correctly with files > 1GB using unix_stat. However, 32-bit binaries do not (except on macOS).