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

Restore last version after positive result #3867

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
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-version-restore-after-pp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Restore last version after positive result

We fixed a bug in the copy routine that prevented restoring of a previous version after post-processing (e.g. virus scanning)

https://github.com/cs3org/reva/pull/3867
https://github.com/owncloud/enterprise/issues/5709
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func (upload *Upload) cleanup(cleanNode, cleanBin, cleanInfo bool) {
upload.Node = nil
default:

if err := upload.lu.CopyMetadata(upload.Node.InternalPath(), p, func(attributeName string) bool {
if err := upload.lu.CopyMetadata(p, upload.Node.InternalPath(), func(attributeName string) bool {
micbar marked this conversation as resolved.
Show resolved Hide resolved
return strings.HasPrefix(attributeName, prefixes.ChecksumPrefix) ||
attributeName == prefixes.TypeAttr ||
attributeName == prefixes.BlobIDAttr ||
Expand Down