spf13 / afero

A FileSystem Abstraction System for Go
Apache License 2.0
5.79k stars 498 forks source link

Bug: OpenFile broken for MemMapFs #415

Open jimsnab opened 5 months ago

jimsnab commented 5 months ago

Basic scenario doesn't work.

  1. Create a file with os.O_CREATE|os.O_RDWR|os.O_EXCL and close it
  2. Try to reopen the file with os.O_RDWR|os.O_EXCL

Result: file exists error

Expected: reopen should succeed

See

https://goplay.tools/snippet/e6a3inm51RX