You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opfs-worker ignores the byte count FileSystemSyncAccessHandle.write() returns, so a short write corrupts the file silently #138
FileSystemSyncAccessHandle.write() returns the number of bytes written. Nothing compares it with data.byteLength.
Failure scenario
A partial write (disk nearly full) leaves a hole; the next saveAppend lands at the assumed offset and the saved MP4 is corrupt with no error.
Suggested fix
const n = handle.write(...); if (n !== data.byteLength) throw new Error(...) in all three places.
Confidence: medium (depends on Gecko returning a short count rather than throwing).
From a line-by-line code review of the tree at 41363fd (2026-10-02). Each claim above was checked against the source before filing; the reproduction steps and line references are as of that commit.
Activity