Skip to content

Commit

Permalink
propagate after restoring a file version (#1980)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas authored Aug 10, 2021
1 parent 3fe79c8 commit b317948
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/propagate-restore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Propagate the etag after restoring a file version

The decomposedfs didn't propagate after restoring a file version.

https://github.com/cs3org/reva/pull/1980
7 changes: 6 additions & 1 deletion pkg/storage/utils/decomposedfs/revisions.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,12 @@ func (fs *Decomposedfs) RestoreRevision(ctx context.Context, ref *provider.Refer
return
}

return fs.copyMD(revisionPath, nodePath)
err = fs.copyMD(revisionPath, nodePath)
if err != nil {
return
}

return fs.tp.Propagate(ctx, n)
}

log.Error().Err(err).Interface("ref", ref).Str("originalnode", kp[0]).Str("revisionKey", revisionKey).Msg("original node does not exist")
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/expected-failures-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ These tests succeed when running against ocis because there we handle the releva
- [apiTrashbin/trashbinFilesFolders.feature:230](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L230)
- [apiTrashbin/trashbinFilesFolders.feature:231](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L231)

#### [Implement Versions Feature for ocis storage](https://github.com/owncloud/product/issues/210)
- [apiWebdavEtagPropagation2/restoreVersion.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavEtagPropagation2/restoreVersion.feature#L10)

#### [Getting information about a folder overwritten by a file gives 500 error instead of 404](https://github.com/owncloud/ocis/issues/1239)
These tests are about overwriting files or folders in the `Shares` folder of a user.
- [apiWebdavProperties1/copyFile.feature:226](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L226)
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/expected-failures-on-S3NG-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Basic file management like up and download, move, copy, properties, quota, trash
- [apiVersions/fileVersions.feature:455](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersions.feature#L455)
- [apiVersions/fileVersionsSharingToShares.feature:301](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersionsSharingToShares.feature#L301)

#### [Implement Versions Feature for ocis storage](https://github.com/owncloud/product/issues/210)
- [apiWebdavEtagPropagation2/restoreVersion.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavEtagPropagation2/restoreVersion.feature#L10)

#### [Getting information about a folder overwritten by a file gives 500 error instead of 404](https://github.com/owncloud/ocis/issues/1239)
- [apiWebdavProperties1/copyFile.feature:226](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L226)
- [apiWebdavProperties1/copyFile.feature:227](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L227)
Expand Down

0 comments on commit b317948

Please sign in to comment.