mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
fix: return numeric `blksize` and `blocks` from asar `fs.stat` Previously, `fs.stat` on files inside `.asar` archives returned `undefined` for `blksize` and `blocks`, violating the Node.js API contract where these fields must be `number | bigint`. Use `4096` for `blksize` (matching the convention used by `memfs` and the proposed `node:vfs` module in nodejs/node#61478) and compute `blocks` as `ceil(size / 512)` (standard 512-byte block units). Fixes #42686 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org>