Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eosfs: disable purging of recycle items #1099

Merged
merged 4 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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