if err != nil && err != io.EOF {
log.Fatalln("Error during reading:", err)
}
if err != nil && err != io.EOF {
log.Fatalln("Error during reading:", err)
}
bufStdin.Discard(prefixIdx)
tarR = tar.NewReader(bufStdin)
sds["xx"] = string(nncp.TRx)
bufStdin.Discard(prefixIdx)
tarR = tar.NewReader(bufStdin)
sds["xx"] = string(nncp.TRx)
ctx.LogE("nncp-bundle", sds, errors.New("not enough spool space"), "")
continue
}
ctx.LogE("nncp-bundle", sds, errors.New("not enough spool space"), "")
continue
}
if _, err = nncp.Base32Codec.DecodeString(pktName); err != nil {
ctx.LogD("nncp-bundle", nncp.SdsAdd(sds, nncp.SDS{"err": "bad packet name"}), "")
continue
if _, err = nncp.Base32Codec.DecodeString(pktName); err != nil {
ctx.LogD("nncp-bundle", nncp.SdsAdd(sds, nncp.SDS{"err": "bad packet name"}), "")
continue
- selfPath = filepath.Join(ctx.Spool, ctx.SelfId.String(), string(nncp.TRx))
- dstPath = filepath.Join(selfPath, pktName)
+ selfPath := filepath.Join(ctx.Spool, ctx.SelfId.String(), string(nncp.TRx))
+ dstPath := filepath.Join(selfPath, pktName)
if _, err = os.Stat(dstPath); err == nil || !os.IsNotExist(err) {
ctx.LogD("nncp-bundle", sds, "Packet already exists")
continue
if _, err = os.Stat(dstPath); err == nil || !os.IsNotExist(err) {
ctx.LogD("nncp-bundle", sds, "Packet already exists")
continue