Incorrect filesize and timestamps for JavaScript backend
The JavaScript backend still has some bugs when filling the stat data used in the FileStatus data structure:
Some issues I've found:
- the time fields (
st_atime/st_mtime/st_ctime) fields are filled assuming that the size reported by theconfigurescript is for wholetimespecstruct, which results in 32 bit for the seconds + 32 bit for nanoseconds. In realitystat.st_mtimeis actually defined to bestat.st_mtim.tv_secand should be 64 bit. - the large field
st_sizeis filled in the wrong order, resulting in the wrong size being decoded.
I'm working on a fix and adding a test that tests these basic file properties so that we can find them in a simple test (instead in something strange going wrong in cabal/backpack tests)