Skip to content

Match JavaScript fileStat to Emscripten fileStat layout

Josh Meredith requested to merge wip/js-fileStat into master

Fixes #22573 (closed)

The JavaScript backend uses Emscripten's header files for hsc2hs features. To ensure that these features, such as #peek, work in the JavaScript backend, JavaScript structs must match the layout of their Emscripten counterparts.

This patch fixes the fileStat struct layout in JavaScript so that it matches Emscripten's fileStat layout, which fixes bugs that showed up in the testsuite in the form of file modes being incorrect, including in distinguishing whether a file is a directory/regular file.

Edited by Josh Meredith

Merge request reports