diff options
author | 2023-01-23 10:24:00 +0100 | |
---|---|---|
committer | 2023-01-23 10:24:00 +0100 | |
commit | 98a09b563318b751bb01d7cbc3af5cfc4601c9bd (patch) | |
tree | 63ed55523830a4c0a99d597b487cff22e0d20eff /vendor/github.com/spf13/afero/memmap.go | |
parent | [chore]: Bump github.com/abema/go-mp4 from 0.9.0 to 0.10.0 (#1374) (diff) | |
download | gotosocial-98a09b563318b751bb01d7cbc3af5cfc4601c9bd.tar.xz |
[chore]: Bump github.com/spf13/viper from 1.14.0 to 1.15.0 (#1375)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.14.0...v1.15.0)
---
updated-dependencies:
- dependency-name: github.com/spf13/viper
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/spf13/afero/memmap.go')
-rw-r--r-- | vendor/github.com/spf13/afero/memmap.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/spf13/afero/memmap.go b/vendor/github.com/spf13/afero/memmap.go index ea0798d87..d06975e71 100644 --- a/vendor/github.com/spf13/afero/memmap.go +++ b/vendor/github.com/spf13/afero/memmap.go @@ -142,6 +142,11 @@ func (m *MemMapFs) Mkdir(name string, perm os.FileMode) error { } 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 |