From 9407e53c593842915d12e3a60b0b2029299e8685 Mon Sep 17 00:00:00 2001 From: Hugo Gonzalez Labrador Date: Tue, 18 Aug 2020 16:12:39 +0200 Subject: [PATCH 1/3] eosfs: disable purging of recycle items --- pkg/storage/utils/eosfs/eosfs.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkg/storage/utils/eosfs/eosfs.go b/pkg/storage/utils/eosfs/eosfs.go index 80bd11001a..71e3c63c99 100644 --- a/pkg/storage/utils/eosfs/eosfs.go +++ b/pkg/storage/utils/eosfs/eosfs.go @@ -1234,17 +1234,7 @@ func (fs *eosfs) RestoreRevision(ctx context.Context, ref *provider.Reference, r } func (fs *eosfs) PurgeRecycleItem(ctx context.Context, key string) error { - u, err := getUser(ctx) - if err != nil { - return errors.Wrap(err, "storage_eos: no user in ctx") - } - - uid, gid, err := fs.getUserUIDAndGID(ctx, u) - if err != nil { - return err - } - - return fs.c.RestoreDeletedEntry(ctx, uid, gid, key) + return errtypes.NotSupported("eos: operation not supported") } func (fs *eosfs) EmptyRecycle(ctx context.Context) error { From d5dcf3533a910090139aa139270b4d5dac9d9150 Mon Sep 17 00:00:00 2001 From: Hugo Gonzalez Labrador Date: Tue, 18 Aug 2020 16:16:21 +0200 Subject: [PATCH 2/3] add changelog --- changelog/unreleased/eosfs-recycle-purge.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 changelog/unreleased/eosfs-recycle-purge.md diff --git a/changelog/unreleased/eosfs-recycle-purge.md b/changelog/unreleased/eosfs-recycle-purge.md new file mode 100644 index 0000000000..ef31b10fda --- /dev/null +++ b/changelog/unreleased/eosfs-recycle-purge.md @@ -0,0 +1,8 @@ +Bugfix: do not restore recycle entry on purge. + + +This PR fixes a bug in the EOSFS driver that was restoring a deleted entry +when asking for its permanent purge. +EOS does not have the functionality to purge individual files, but the whole recycle of the user. + +https://github.com/cs3org/reva/pull/1099 From a0896f0d6f308da1fed4669d808474108ec28d5f Mon Sep 17 00:00:00 2001 From: Hugo Gonzalez Labrador Date: Wed, 19 Aug 2020 11:57:48 +0200 Subject: [PATCH 3/3] fix changelog entry --- changelog/unreleased/eosfs-recycle-purge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/eosfs-recycle-purge.md b/changelog/unreleased/eosfs-recycle-purge.md index ef31b10fda..ce674eafb7 100644 --- a/changelog/unreleased/eosfs-recycle-purge.md +++ b/changelog/unreleased/eosfs-recycle-purge.md @@ -1,4 +1,4 @@ -Bugfix: do not restore recycle entry on purge. +Bugfix: do not restore recycle entry on purge This PR fixes a bug in the EOSFS driver that was restoring a deleted entry