diff --git a/fs/ops.go b/fs/ops.go index b43c2e92..4589623f 100644 --- a/fs/ops.go +++ b/fs/ops.go @@ -72,8 +72,8 @@ func WithReaderContent(r io.Reader) PathOp { if err != nil { return err } + defer f.Close() _, err = io.Copy(f, r) - f.Close() return err } }