]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cmd/nncp-xfer/main.go
Raise copyright years
[nncp.git] / src / cmd / nncp-xfer / main.go
index 9c29b0284b1975b4da44fcd927a3cb5841901a32..6790e6ca96494c6b68ad075b522b3ad4feed4811 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
@@ -293,7 +293,9 @@ func main() {
                        }
                        r, w := io.Pipe()
                        go func() {
-                               _, err := io.CopyN(w, bufio.NewReader(fd), fiInt.Size())
+                               _, err := io.CopyN(
+                                       w, bufio.NewReaderSize(fd, nncp.MTHBlockSize), fiInt.Size(),
+                               )
                                if err == nil {
                                        err = w.Close()
                                }
@@ -477,7 +479,7 @@ Tx:
                        }
                        bufW := bufio.NewWriter(tmp)
                        copied, err := nncp.CopyProgressed(
-                               bufW, bufio.NewReader(fd), "Tx",
+                               bufW, bufio.NewReaderSize(fd, nncp.MTHBlockSize), "Tx",
                                append(les, nncp.LE{K: "FullSize", V: job.Size}),
                                ctx.ShowPrgrs,
                        )