Skip to content

Commit

Permalink
Merge pull request #3889 from aduffeck/fix-space-metadata-propagation
Browse files Browse the repository at this point in the history
Bump space TreeMTime when changing the metadata
  • Loading branch information
aduffeck authored May 15, 2023
2 parents 30125f1 + 18f98c5 commit 6d1749b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-space-root-mtime-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Update space root mtime when changing space metadata

We fixed a problem where space mtimes were not updated when their metadata changed, resulting in changes not being picked up by other services like search.

https://github.com/cs3org/reva/pull/3889
https://github.com/owncloud/ocis/issues/6289
1 change: 1 addition & 0 deletions pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ func (fs *Decomposedfs) UpdateStorageSpace(ctx context.Context, req *provider.Up
}, nil
}
}
metadata[prefixes.TreeMTimeAttr] = []byte(time.Now().UTC().Format(time.RFC3339Nano))

err = spaceNode.SetXattrs(metadata, true)
if err != nil {
Expand Down

0 comments on commit 6d1749b

Please sign in to comment.