]> Cypherpunks.ru repositories - nncp.git/commitdiff
Visible message about bad chunk's checksum
authorSergey Matveev <stargrave@stargrave.org>
Fri, 28 Apr 2017 13:13:34 +0000 (16:13 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 28 Apr 2017 13:13:34 +0000 (16:13 +0300)
src/cypherpunks.ru/nncp/cmd/nncp-reass/main.go
src/cypherpunks.ru/nncp/humanizer.go

index 10024e5e6521d97cd3732a7e8fd64f10ee189992..1bb60093f25e7120361cfa4444490261f1b427c6 100644 (file)
@@ -154,8 +154,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
                        ctx.LogE("nncp-reass", nncp.SDS{
                                "path":  path,
                                "chunk": strconv.Itoa(chunkNum),
-                               "err":   "checksum is bad",
-                       }, "")
+                       }, "checksum is bad")
                        allChecksumsGood = false
                }
        }
index 546b71fea60ee8e49e49f67da764aaad7fa17571..49b715a1c91f6c7c118196b0bf7e948c0aac4a02 100644 (file)
@@ -234,6 +234,9 @@ func (ctx *Ctx) Humanize(s string) string {
                                rem,
                        )
                }
+               if err, exists := sds["err"]; exists {
+                       msg += ": " + err
+               }
        default:
                return s
        }