spf13 / afero

A FileSystem Abstraction System for Go
Apache License 2.0
5.99k stars 514 forks source link

Bug: OpenFile broken for MemMapFs #415

Open jimsnab opened 9 months ago

jimsnab commented 9 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