]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cmd/nncp-reass/main.go
Raise copyright years
[nncp.git] / src / cmd / nncp-reass / main.go
index d095f95d041ba4b1c99cc2513828f2e2cce057b7..492ef25515d2026d3fff8f5eb82470036268d464 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -157,7 +157,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
                }
                hsh = nncp.MTHNew(fi.Size(), 0)
                if _, err = nncp.CopyProgressed(
-                       hsh, bufio.NewReader(fd), "check",
+                       hsh, bufio.NewReaderSize(fd, nncp.MTHBlockSize), "check",
                        nncp.LEs{{K: "Pkt", V: chunkPath}, {K: "FullSize", V: fi.Size()}},
                        ctx.ShowPrgrs,
                ); err != nil {
@@ -213,7 +213,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
                        log.Fatalln("Can not stat file:", err)
                }
                if _, err = nncp.CopyProgressed(
-                       dstW, bufio.NewReader(fd), "reass",
+                       dstW, bufio.NewReaderSize(fd, nncp.MTHBlockSize), "reass",
                        nncp.LEs{{K: "Pkt", V: chunkPath}, {K: "FullSize", V: fi.Size()}},
                        ctx.ShowPrgrs,
                ); err != nil {