diff --git a/changelog/unreleased/eosfs-recycle-purge.md b/changelog/unreleased/eosfs-recycle-purge.md new file mode 100644 index 0000000000..ce674eafb7 --- /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 diff --git a/pkg/storage/utils/eosfs/eosfs.go b/pkg/storage/utils/eosfs/eosfs.go index 17db3c7137..09b31c3b47 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 {