Bug 248719
| Summary: | Files written to OPFS through a sync access handle in Safari are read back out with a size of zero bytes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nathan <nathan> |
| Component: | Website Storage | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Major | CC: | ap, cdumez, sihui_liu, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 13 | ||
Nathan
After closing the sync access handle, reading a file from OPFS with `getFile()` always returns a `File` of size zero.
I've create a gist with file to reproduce the problem. The example in the gist works in Chrome, the file contents can be read back out after the sync access handle is closed.
See https://gist.github.com/myobie/021fc07f09e013b1e5c137ec09282aeb
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/103216871>
Nathan
I've just re-tested this on Safari 16.5 and the sync OPFS calls work, files can be read back from the fs. Thanks for fixing this bug 💪