Skip to content

Commit

Permalink
fix if-match logic during InitiateFileUpload
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Sep 6, 2022
1 parent f07775d commit 2c1aa86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion changelog/unreleased/jsoncs3-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Enhancement: cs3 to jsoncs3 share manager migration

We added a Load() to the jsoncs3 and Dump() to the sc3 share manager. The shareid might need to be prefixed with a storageid and space id.

https://github.com/cs3org/reva/pull/3171
https://github.com/cs3org/reva/pull/3171
https://github.com/cs3org/reva/pull/3194
3 changes: 2 additions & 1 deletion internal/grpc/services/storageprovider/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,9 @@ func (s *service) InitiateFileDownload(ctx context.Context, req *provider.Initia
}

func validateIfMatch(ifMatch string, info *provider.ResourceInfo) bool {
return ifMatch != info.GetEtag()
return ifMatch == info.GetEtag()
}

func validateIfUnmodifiedSince(ifUnmodifiedSince *typesv1beta1.Timestamp, info *provider.ResourceInfo) bool {
switch {
case ifUnmodifiedSince == nil || info.GetMtime() == nil:
Expand Down

0 comments on commit 2c1aa86

Please sign in to comment.