Closed Bug 1832224 Opened 2 years ago Closed 1 year ago

[wpt-sync] Sync PR 39919 - FSA: Fail to create a writable if the file does not exist

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 39919 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/39919
Details from upstream follow.

Austin Sullivan <asully@chromium.org> wrote:

FSA: Fail to create a writable if the file does not exist

DO NOT MERGE

Currently, the createWritable() algorithm specifies that we must throw
a NotFoundError if the file corresponding to the FileSystemHandle does
not exist. See
https://fs.spec.whatwg.org/#dom-filesystemfilehandle-createwritable

Unfortunately, this does not match the behavior that has been
implemented in Chrome for a very long time; specifically that

  • createWritable({ keepExistingData: true }) fails if the file does
    not exist, since there is no existing data to copy to the swap file
  • createWritable({ keepExistingData: false }) succeeds if the file
    does not exist, since there is no existing data to copy. It still
    fails if the parent directory does not exist, however

Bug: 1405851
Change-Id: I788c5b177c188862d4b08b5dd876404522fa32d5
Reviewed-on: https://chromium-review.googlesource.com/4520224
WPT-Export-Revision: 49d17270b4bbbfdf0fa459837a876ba7fec5c7b1

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
Whiteboard: [wptsync downstream error] → [wptsync downstream]
You need to log in before you can comment on or make changes to this bug.