Files
electron/lib/node
Calvin 8b7e7de208 fix: return numeric blksize and blocks from asar fs.stat (#50825)
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: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 10:19:09 +02:00
..