diff options
| author | 2022-11-05 12:10:19 +0100 | |
|---|---|---|
| committer | 2022-11-05 11:10:19 +0000 | |
| commit | bcb80d3ff4a669d52d63950c8830427646c05884 (patch) | |
| tree | 4aa95a83545b3f87a80fe4b625cb6f2ad9c4427f /internal/db | |
| parent | [bugfix] Increase field size limits when registering apps (#958) (diff) | |
| download | gotosocial-bcb80d3ff4a669d52d63950c8830427646c05884.tar.xz | |
[chore] bump gruf/go-store to v2 (#953)
* [chore] bump gruf/go-store to v2
* no more boobs
Diffstat (limited to 'internal/db')
| -rw-r--r-- | internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go b/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go index b0179ec4f..bde96a86c 100644 --- a/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go +++ b/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go @@ -24,8 +24,8 @@ import ( "fmt" "path" - "codeberg.org/gruf/go-store/kv" - "codeberg.org/gruf/go-store/storage" + "codeberg.org/gruf/go-store/v2/kv" + "codeberg.org/gruf/go-store/v2/storage" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/log" @@ -34,13 +34,13 @@ import ( func init() { deleteAttachment := func(ctx context.Context, l log.Entry, a *gtsmodel.MediaAttachment, s *kv.KVStore, tx bun.Tx) { - if err := s.Delete(a.File.Path); err != nil && err != storage.ErrNotFound { + if err := s.Delete(ctx, a.File.Path); err != nil && err != storage.ErrNotFound { l.Errorf("error removing file %s: %s", a.File.Path, err) } else { l.Debugf("deleted %s", a.File.Path) } - if err := s.Delete(a.Thumbnail.Path); err != nil && err != storage.ErrNotFound { + if err := s.Delete(ctx, a.Thumbnail.Path); err != nil && err != storage.ErrNotFound { l.Errorf("error removing file %s: %s", a.Thumbnail.Path, err) } else { l.Debugf("deleted %s", a.Thumbnail.Path) @@ -70,7 +70,7 @@ func init() { } return db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error { - s, err := kv.OpenFile(storageBasePath, &storage.DiskConfig{ + s, err := kv.OpenDisk(storageBasePath, &storage.DiskConfig{ LockFile: path.Join(storageBasePath, "store.lock"), }) if err != nil { |
