- tmp.Close()
- ctx.LogE("rx", sds, err, "copy")
+ tmp.Close() // #nosec G104
+ ctx.LogE("rx-sync", les, err, func(les LEs) string {
+ return fmt.Sprintf(
+ "Tossing file %s/%s (%s): %s: syncing",
+ ctx.NodeName(job.PktEnc.Sender), pktName,
+ humanize.IBytes(uint64(pktSize)), dst,
+ )
+ })
+ isBad = true
+ goto Closing
+ }
+ if err = tmp.Close(); err != nil {
+ ctx.LogE("rx-close", les, err, func(les LEs) string {
+ return fmt.Sprintf(
+ "Tossing file %s/%s (%s): %s: closing",
+ ctx.NodeName(job.PktEnc.Sender), pktName,
+ humanize.IBytes(uint64(pktSize)), dst,
+ )
+ })