diff -r 8f478162d991 -r 05c40b36d3b2 vendor/github.com/spf13/afero/memmap.go --- a/vendor/github.com/spf13/afero/memmap.go Thu Sep 22 16:37:07 2022 +0200 +++ b/vendor/github.com/spf13/afero/memmap.go Sat Feb 04 12:58:35 2023 +0100 @@ -142,6 +142,11 @@ } m.mu.Lock() + // Dobule check that it doesn't exist. + if _, ok := m.getData()[name]; ok { + m.mu.Unlock() + return &os.PathError{Op: "mkdir", Path: name, Err: ErrFileExists} + } item := mem.CreateDir(name) mem.SetMode(item, os.ModeDir|perm) m.getData()[name] = item