Skip to content

Commit

Permalink
eosfs: disable purging of recycle items (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkode authored Aug 19, 2020
1 parent dcbf0c8 commit 46e2c09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
8 changes: 8 additions & 0 deletions changelog/unreleased/eosfs-recycle-purge.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 1 addition & 11 deletions pkg/storage/utils/eosfs/eosfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 46e2c09

Please sign in to comment.