From: Tom Clegg Date: Tue, 20 Sep 2022 20:45:22 +0000 (-0400) Subject: 19362: Fix unchecked error. X-Git-Tag: 2.5.0~68^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/08e0784f8dea70c66d21933df198bd1539355071 19362: Fix unchecked error. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/services/keep-web/s3.go b/services/keep-web/s3.go index 3c7c2db371..f98efd8fdf 100644 --- a/services/keep-web/s3.go +++ b/services/keep-web/s3.go @@ -581,6 +581,8 @@ func (h *handler) serveS3(w http.ResponseWriter, r *http.Request) bool { } } +// Save modifications to the indicated collection in srcfs, then (if +// successful) ensure they are also reflected in dstfs. func (h *handler) syncCollection(srcfs, dstfs arvados.CustomFileSystem, path string) error { coll, _ := h.determineCollection(srcfs, path) if coll == nil || coll.UUID == "" { @@ -592,6 +594,9 @@ func (h *handler) syncCollection(srcfs, dstfs arvados.CustomFileSystem, path str } defer d.Close() err = d.Sync() + if err != nil { + return err + } snap, err := d.Snapshot() if err != nil { return err