Commit Graph
3 Commits
Author SHA1 Message Date
upstream d43dc733dc Upstream spf13/afero state of the touched files before ac8fa0258e 2026-09-02 11:40:32 +02:00
dualfroz afcb7e66f3 fix: only enforce O_EXCL on MemMapFs OpenFile when O_CREATE is set
Per POSIX, O_EXCL is meaningful only together with O_CREATE. MemMapFs
OpenFile returned ErrFileExists whenever O_EXCL was set on an existing
file, so reopening a file with O_RDWR|O_EXCL failed even though no
creation was requested. Guard the existence check with O_CREATE so that
O_EXCL without O_CREATE opens the existing file, matching os.OpenFile.

Fixes #415
2026-09-02 11:37:36 +02:00
upstream 2ae4e0266a Upstream spf13/afero state of the touched files before 6d1a780dfd 2026-09-02 11:37:36 +02:00