Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 10, 2023

DO NOT MERGE (yet) whatwg/fs#125

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: f019307801c3cff54e0919eb1839a39c5002a899

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

DO NOT MERGE (yet) whatwg/fs#125

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
@chromium-wpt-export-bot
Copy link
Collaborator Author

Close this PR because the Chromium CL has been abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants