Skip to content

Commit

Permalink
Fix purging spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Dec 3, 2024
1 parent 7dbffab commit 05a41fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/share/manager/jsoncs3/providercache/providercache.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,11 @@ func (c *Cache) PurgeSpace(ctx context.Context, storageID, spaceID string) error
if !ok {
return nil
}
spaces.Spaces.Store(spaceID, &Shares{})
newShares := &Shares{}
if space, ok := spaces.Spaces.Load(spaceID); ok {
newShares.Etag = space.Etag // keep the etag to allow overwriting the state on the server
}
spaces.Spaces.Store(spaceID, newShares)

return c.Persist(ctx, storageID, spaceID)
}
Expand Down

0 comments on commit 05a41fe

Please sign in to comment.