diff --git a/changelog/unreleased/minor-cleanup.md b/changelog/unreleased/minor-cleanup.md new file mode 100644 index 0000000000..a9c14e09da --- /dev/null +++ b/changelog/unreleased/minor-cleanup.md @@ -0,0 +1,6 @@ +Bugfix: minor cleanup + + - The `chunk_folder` config option is unused + - Prevent a panic when looking up spaces + +https://github.com/cs3org/reva/pull/2668 diff --git a/examples/oc-phoenix/frontend.toml b/examples/oc-phoenix/frontend.toml index 905a87e5d2..03bf49720b 100644 --- a/examples/oc-phoenix/frontend.toml +++ b/examples/oc-phoenix/frontend.toml @@ -51,7 +51,6 @@ public = true # force PKCS for public clients [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/var/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has diff --git a/internal/http/services/owncloud/ocdav/spacelookup/spacelookup.go b/internal/http/services/owncloud/ocdav/spacelookup/spacelookup.go index dfd887b03e..50e4af7750 100644 --- a/internal/http/services/owncloud/ocdav/spacelookup/spacelookup.go +++ b/internal/http/services/owncloud/ocdav/spacelookup/spacelookup.go @@ -105,7 +105,10 @@ func LookUpStorageSpacesForPathWithChildren(ctx context.Context, client gateway. } lSSRes, err := client.ListStorageSpaces(ctx, lSSReq) - if err != nil || lSSRes.Status.Code != rpc.Code_CODE_OK { + if err != nil { + return nil, nil, err + } + if lSSRes.Status.GetCode() != rpc.Code_CODE_OK { return nil, lSSRes.Status, err } diff --git a/tests/oc-integration-tests/drone/frontend-global.toml b/tests/oc-integration-tests/drone/frontend-global.toml index 12d5a2bc92..40ba34506d 100644 --- a/tests/oc-integration-tests/drone/frontend-global.toml +++ b/tests/oc-integration-tests/drone/frontend-global.toml @@ -18,7 +18,6 @@ allow_credentials = true [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/drone/src/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has diff --git a/tests/oc-integration-tests/drone/frontend.toml b/tests/oc-integration-tests/drone/frontend.toml index 5b0dcaae1a..35e5d2f92a 100644 --- a/tests/oc-integration-tests/drone/frontend.toml +++ b/tests/oc-integration-tests/drone/frontend.toml @@ -19,7 +19,6 @@ allow_credentials = true [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/drone/src/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has diff --git a/tests/oc-integration-tests/local-mesh/frontend-global.toml b/tests/oc-integration-tests/local-mesh/frontend-global.toml index 3803e870d3..255acfeea6 100644 --- a/tests/oc-integration-tests/local-mesh/frontend-global.toml +++ b/tests/oc-integration-tests/local-mesh/frontend-global.toml @@ -18,7 +18,6 @@ allow_credentials = true [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/var/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has diff --git a/tests/oc-integration-tests/local-mesh/frontend.toml b/tests/oc-integration-tests/local-mesh/frontend.toml index ee8b53ff04..2e6f5fdd9a 100644 --- a/tests/oc-integration-tests/local-mesh/frontend.toml +++ b/tests/oc-integration-tests/local-mesh/frontend.toml @@ -19,7 +19,6 @@ allow_credentials = true [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/var/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has diff --git a/tests/oc-integration-tests/local/combined.toml b/tests/oc-integration-tests/local/combined.toml index c3cd84bd57..1eab1b89e1 100644 --- a/tests/oc-integration-tests/local/combined.toml +++ b/tests/oc-integration-tests/local/combined.toml @@ -92,7 +92,6 @@ allow_credentials = true [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/var/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has diff --git a/tests/oc-integration-tests/local/frontend-global.toml b/tests/oc-integration-tests/local/frontend-global.toml index 136fdfee2f..7c62831589 100644 --- a/tests/oc-integration-tests/local/frontend-global.toml +++ b/tests/oc-integration-tests/local/frontend-global.toml @@ -22,7 +22,6 @@ allow_credentials = true [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/var/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has diff --git a/tests/oc-integration-tests/local/frontend.toml b/tests/oc-integration-tests/local/frontend.toml index 674a74589a..f4b0f1ec32 100644 --- a/tests/oc-integration-tests/local/frontend.toml +++ b/tests/oc-integration-tests/local/frontend.toml @@ -23,7 +23,6 @@ allow_credentials = true [http.services.ocdav] # serve ocdav on the root path prefix = "" -chunk_folder = "/var/tmp/reva/chunks" # for user lookups # prefix the path of requests to /dav/files with this namespace # While owncloud has only listed usernames at this endpoint CERN has