File System API issue with writing file with same name as containing folder

This page attempts to reproduce an issue with the File System API involving an error when writing to a file with the same name as the folder it is contained in.

Reproduction Steps

  1. Create a new folder on your device and name it test
  2. to select and give this page access to the folder you created
  3. to attempt to write to a file in that folder, also called test. This will cause an error, which you should see in the console. The file will be created but will be completely empty.
  4. Delete the file created in the previous step
  5. to attempt to write to a file in that folder, called other, and then rename it to test. This will cause an different error, which you should also see in the console. The file will be created, but fail to be renamed.
  6. Reload the page, and retry all steps with a folder named something besides test. Both buttons should succeed.

Source code for this demo - Chromium Bug Report