From bc66e39d2c6bac6874f9416fe3c7d24eddc48edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 15 Jun 2021 11:03:46 +0000 Subject: [PATCH] fix trash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- internal/grpc/services/storageprovider/storageprovider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/grpc/services/storageprovider/storageprovider.go b/internal/grpc/services/storageprovider/storageprovider.go index ded798e908..cc2f296c55 100644 --- a/internal/grpc/services/storageprovider/storageprovider.go +++ b/internal/grpc/services/storageprovider/storageprovider.go @@ -838,8 +838,8 @@ func (s *service) RestoreRecycleItem(ctx context.Context, req *provider.RestoreR } func (s *service) PurgeRecycle(ctx context.Context, req *provider.PurgeRecycleRequest) (*provider.PurgeRecycleResponse, error) { - // if a key was sent as opacque id purge only that item - if req.GetRef() != nil && req.GetRef().GetResourceId() != nil { + // if a key was sent as opaque id purge only that item + if req.GetRef().GetResourceId() != nil && req.GetRef().GetResourceId().OpaqueId != "" { if err := s.storage.PurgeRecycleItem(ctx, req.GetRef().GetResourceId().OpaqueId); err != nil { var st *rpc.Status switch err.(type) {