From 72380a687765495fa0c15fcfcba102cab058c0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 24 Aug 2020 10:09:14 +0200 Subject: [PATCH] [owncloud] propagate mtime on RemoveGrant (#1115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/propagate-mtime-on-remove-grant.md | 5 +++++ pkg/storage/fs/owncloud/owncloud.go | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/propagate-mtime-on-remove-grant.md diff --git a/changelog/unreleased/propagate-mtime-on-remove-grant.md b/changelog/unreleased/propagate-mtime-on-remove-grant.md new file mode 100644 index 0000000000..06df7dc54a --- /dev/null +++ b/changelog/unreleased/propagate-mtime-on-remove-grant.md @@ -0,0 +1,5 @@ +Bugfix: owncloud driver - propagate mtime on RemoveGrant + +When removing a grant the mtime change also needs to be propagated. Only affectsn the owncluod storage driver. + +https://github.com/cs3org/reva/pull/1115 \ No newline at end of file diff --git a/pkg/storage/fs/owncloud/owncloud.go b/pkg/storage/fs/owncloud/owncloud.go index 618b59f845..cb51617be4 100644 --- a/pkg/storage/fs/owncloud/owncloud.go +++ b/pkg/storage/fs/owncloud/owncloud.go @@ -1081,7 +1081,11 @@ func (fs *ocfs) RemoveGrant(ctx context.Context, ref *provider.Reference, g *pro attr = sharePrefix + "u:" + g.Grantee.Id.OpaqueId } - return xattr.Remove(np, attr) + if err = xattr.Remove(np, attr); err != nil { + return + } + + return fs.propagate(ctx, np) } func (fs *ocfs) UpdateGrant(ctx context.Context, ref *provider.Reference, g *provider.Grant) error {