Skip to content

Commit

Permalink
Merge pull request #3831 from butonic/fix-null-mtime
Browse files Browse the repository at this point in the history
ignore 'null' mtime on tus upload
  • Loading branch information
micbar authored Apr 29, 2023
2 parents ef158f7 + 01c3d1e commit 4d1c9f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-null-mtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: ignore 'null' mtime on tus upload

decomposedfs now ignores 'null' as an mtime

https://github.com/cs3org/reva/pull/3831
8 changes: 6 additions & 2 deletions pkg/storage/utils/decomposedfs/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,14 @@ func (fs *Decomposedfs) InitiateUpload(ctx context.Context, ref *provider.Refere
if metadata != nil {
info.MetaData["providerID"] = metadata["providerID"]
if mtime, ok := metadata["mtime"]; ok {
info.MetaData["mtime"] = mtime
if mtime != "null" {
info.MetaData["mtime"] = mtime
}
}
if expiration, ok := metadata["expires"]; ok {
info.MetaData["expires"] = expiration
if expiration != "null" {
info.MetaData["expires"] = expiration
}
}
if _, ok := metadata["sizedeferred"]; ok {
info.SizeIsDeferred = true
Expand Down

0 comments on commit 4d1c9f4

Please sign in to comment.