Skip to content

Commit

Permalink
Use optional `mtime' in linkPhysicalAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
arielshaqed committed Nov 3, 2024
1 parent 183a03c commit 8490de7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/api/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,9 @@ func (c *Controller) LinkPhysicalAddress(w http.ResponseWriter, r *http.Request,
}

writeTime := time.Now()
if mtime := body.Mtime; mtime != nil {
writeTime = time.Unix(*mtime, 0)
}
fullPhysicalAddress := swag.StringValue(body.Staging.PhysicalAddress)
physicalAddress, addressType := normalizePhysicalAddress(repo.StorageNamespace, fullPhysicalAddress)

Expand Down

0 comments on commit 8490de7

Please sign in to comment.