From 46e405b7ec0ecd0ebaa96a3127bdc06d2e97b121 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Thu, 17 Feb 2022 18:56:33 +0100 Subject: [PATCH] Revert "fix possible nil pointer exception (#2558)" This reverts commit ab703f0e2902e21e257ed0a25284658ba0114bdd. --- changelog/unreleased/remove-base64-encoding-of-ids.md | 1 - pkg/storage/utils/decomposedfs/spaces.go | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/changelog/unreleased/remove-base64-encoding-of-ids.md b/changelog/unreleased/remove-base64-encoding-of-ids.md index b4a8176f08..cc4f051736 100644 --- a/changelog/unreleased/remove-base64-encoding-of-ids.md +++ b/changelog/unreleased/remove-base64-encoding-of-ids.md @@ -3,4 +3,3 @@ Change: Do not encode webDAV ids to base64 We removed the base64 encoding of the IDs and use the format ! with a `!` delimiter. As a reserved delimiter it is URL safe. The IDs will be XML and JSON encoded as necessary. https://github.com/cs3org/reva/pull/2542 -https://github.com/cs3org/reva/pull/2558 diff --git a/pkg/storage/utils/decomposedfs/spaces.go b/pkg/storage/utils/decomposedfs/spaces.go index 4fa9aab127..e0351d9005 100644 --- a/pkg/storage/utils/decomposedfs/spaces.go +++ b/pkg/storage/utils/decomposedfs/spaces.go @@ -419,20 +419,10 @@ func (fs *Decomposedfs) UpdateStorageSpace(ctx context.Context, req *provider.Up } if image, ok := space.Opaque.Map["image"]; ok { imageID := resourceid.OwnCloudResourceIDUnwrap(string(image.Value)) - if imageID == nil { - return &provider.UpdateStorageSpaceResponse{ - Status: &v1beta11.Status{Code: v1beta11.Code_CODE_NOT_FOUND, Message: "decomposedFS: space image resource not found"}, - }, nil - } metadata[xattrs.SpaceImageAttr] = imageID.OpaqueId } if readme, ok := space.Opaque.Map["readme"]; ok { readmeID := resourceid.OwnCloudResourceIDUnwrap(string(readme.Value)) - if readmeID == nil { - return &provider.UpdateStorageSpaceResponse{ - Status: &v1beta11.Status{Code: v1beta11.Code_CODE_NOT_FOUND, Message: "decomposedFS: space readme resource not found"}, - }, nil - } metadata[xattrs.SpaceReadmeAttr] = readmeID.OpaqueId } }