Open a-sully opened 2 years ago
Update: removeEntry()
has been taking an exclusive lock on Chromium browsers for a while now. See https://crbug.com/1254078
This PR is also incorrect as written, since the lock should not be on the directory itself but on the child being removed. I'll update that before sending for review...
Anyways, I filed #138 to track updating updating the spec both for removeEntry()
and remove()
For the sake of backwards compatibility,
removeEntry()
currently only requires acquiring a shared lock in Chromium (though this is not specified). This means that you cannot remove a file with an open Access Handle, but you can remove a file with an openWritableFileStream
. See https://github.com/whatwg/fs/issues/34#issuecomment-1273961101 for context.The
removeEntry()
method should take an exclusive lock, matching #9. At least until we change the locking paradigm to not be based on "exclusive" and "shared" locks in #34.remove()
in https://github.com/whatwg/fs/issues/34(See WHATWG Working Mode: Changes for more details.)
Preview | Diff